Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Possible Duplicate:
How to tell what type of filesystem you’re on?
Find filesystem of an unmounted partition from a script

How can I quickly check the filesystem of the partition? Can I do that by using df?

share|improve this question
add comment

marked as duplicate by jasonwryan, manatwork, Mat, Caleb, Renan Nov 2 '12 at 13:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers

up vote 5 down vote accepted

Yes, according to man df you can:

-T, --print-type      print file system type

Another way is to use the mount command. Without parameters it lists the currently mounted devices, including their file systems.

In case you need to find out only one certain file system, is easier to use the stat command's -f option instead of parsing out one value from the above mentioned commands' output.

share|improve this answer
    
That worked. Thanks! –  tux_drummer Oct 30 '12 at 15:52
add comment

If the filesystem is not mounted (but if it is as well), you can try (though you need read access to the block device):

blkid -o value -s TYPE /dev/block/device

or:

file -Ls /dev/block/device
share|improve this answer
    
Perfect, this works also for unmounted filesystems and even images. And looks less weird than (eval $(blkid $DEV | awk ' { print $3 } '); echo $TYPE)... –  Tobias Kienzler Nov 2 '12 at 6:59
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.