I just formatted stuff. One disk I format as ext2. The other I want to format as ext4. I want to test how they perform.
Now, how do I know the kind of file system in a partition?
ext2ext3ext4linux
I just formatted stuff. One disk I format as ext2. The other I want to format as ext4. I want to test how they perform.
Now, how do I know the kind of file system in a partition?
Best Answer
How do I tell what sort of data (what data format) is in a file?
→ Use the
file
utility.Here, you want to know the format of data in a device file, so you need to pass the
-s
flag to tellfile
not just to say that it's a device file but look at the content. Sometimes you'll need the-L
flag as well, if the device file name is a symbolic link. You'll see output like this:Given this sample output, the first disk has one partition and the second disk has two partitions.
/dev/sda1
is an ext4 filesystem,/dev/sdb1
is an ext2 filesystem, and/dev/sdb2
is some swap space (about 4GB).You must run this command as root, because ordinary users may not read disk partitions directly: if needed, add
sudo
in front.