Author Topic: a CLI tool for probing (non)removable storage devices  (Read 749 times)

Offline Alexey931

  • Sr. Member
  • ****
  • Posts: 271
a CLI tool for probing (non)removable storage devices
« on: July 31, 2010, 05:38:31 AM »
Hi,

There's a useful command for probing storage devices. One can see a lot of things, including filesystem info in some detail. It's neither df nor du. It doesn't require the drive to be mounted. I can neither remember nor Google it  :'( .

Offline Village Idiot

  • Hero Member
  • *****
  • Posts: 2345
  • Have A Nice Day.
Re: a CLI tool for probing (non)removable storage devices
« Reply #1 on: July 31, 2010, 05:51:43 AM »
as root

fdisk -l

or

sfdisk -l

These will list the partitions on all disks that are present.

Is this what you are looking for?
$ fortune
No Microsoft products were used in any way for the creation of this message.
If you are using a Microsoft product to view it, BEWARE! - I'm not
responsible for any harm you might encounter as a result.

Offline Alexey931

  • Sr. Member
  • ****
  • Posts: 271
Re: a CLI tool for probing (non)removable storage devices
« Reply #2 on: July 31, 2010, 06:41:24 AM »
Thanks! It is. BTW, what's the difference between fdisk and sfdisk?

Offline Village Idiot

  • Hero Member
  • *****
  • Posts: 2345
  • Have A Nice Day.
Re: a CLI tool for probing (non)removable storage devices
« Reply #3 on: July 31, 2010, 02:38:47 PM »
One provides an output of data which is somewhat cryptic. The other provides output that is mega-cryptic.  ;D


This link might provide you with more information:
http://www.linuxquestions.org/questions/linux-software-2/sfdisk-advantages-over-fdisk-703442/
Quote
There are several *fdisk programs around. Each has its problems and
strengths. Try them in the order cfdisk, fdisk, sfdisk. (Indeed,
cfdisk is a beautiful program that has strict requirements on the parti-
tion tables it accepts, and produces high quality partition tables. Use
it if you can. fdisk is a buggy program that does fuzzy things - usu-
ally it happens to produce reasonable results. Its single advantage is
that it has some support for BSD disk labels and other non-DOS partition
tables. Avoid it if you can. sfdisk is for hackers only - the user
interface is terrible, but it is more correct than fdisk and more power-
ful than both fdisk and cfdisk. Moreover, it can be used noninterac-
tively.)


And the man page for sfdisk:
http://linux.die.net/man/8/sfdisk
$ fortune
No Microsoft products were used in any way for the creation of this message.
If you are using a Microsoft product to view it, BEWARE! - I'm not
responsible for any harm you might encounter as a result.

Offline Alexey931

  • Sr. Member
  • ****
  • Posts: 271
Re: a CLI tool for probing (non)removable storage devices
« Reply #4 on: August 01, 2010, 12:11:10 PM »
Thanks!