Determining the filesystem for storage media

Slashdot it! Delicious Share on Facebook Tweet! Digg!

parted

As with the graphical tools Kvpm [3] and GParted [4], parted proves to be information friendly. parted delivers detailed information about partitions with the -l (--list ) option. Listing 4 shows the excerpt from the last line of Figure 3. In the fifth column of the output, you will see the filesystem, which in this figure is ext4. GParted delivers similarly large amounts of information but much more elegantly and in graphical format (Figure 5).

Listing 4

parted output

Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/fehmarn--vg-home: 227GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number  Start  End    Size   File system  Flags
 1      0,00B  227GB  227GB  ext4
Figure 5: If necessary, GParted can deliver extensive details about the mounted filesystem.

file

Occasionally, the file command also comes in handy. This command yields information about a given entry in a filesystem. By default, it ignores unusual entries like "special files." However, file is able to read these entries with the help of the -s (--special-files ) option. Listing 5 shows the call for the fifth partition on the first hard drive. The call correctly finds an encrypted filesystem (LUKS) on the drive.

Listing 5

Using file

# file -s /dev/sda5
/dev/sda5: LUKS encrypted file, ver 1 [aes, xts-plain64, sha1] UUID: 305a1a1b-797a-4634-9acd-49c1f530978b

Buy this article as PDF

Express-Checkout as PDF

Pages: 5

Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content