Detecting filesystem type on a mounted partition is an easy task. This can be achieved by mount command or df -T. Below are listed few options on how to detect filesystem on an unmounted device/partition. In the scenario below the block devices /dev/sda1 and /dev/sdb1 are used as an example. Detect unmonted partition filesystem type using file command:
# file -s /dev/sdb1 | cut -d , -f1
/dev/sdb1: sticky Linux rev 1.0 ext3 filesystem data
# file -s /dev/sda1 | cut -d , -f1
/dev/sda1: sticky Linux rev 1.0 ext4 filesystem data

From the above example we can see that partition /dev/sda1 is of ext4 filesystem type whereas /dev/sdb1 has ext3 filesystem type. Alternatively, we can use blkid command:
# blkid /dev/sdb1
/dev/sdb1: UUID="57bbbdd1-14c0-4dab-96be-4542fa2fc862" SEC_TYPE="ext2" TYPE="ext3" 
# blkid /dev/sda1
/dev/sda1: UUID="60254c19-67c0-404b-9743-1b8b7f0b11cb" TYPE="ext4"
Please refer all article related questions to:

You may also be interested in: