Back
Use the below code to check the type of the filesystem.
$ stat -f -c '%T' /xfs$ stat -f -c '%T' /dev/shmtmpfs
$ stat -f -c '%T' /
xfs
$ stat -f -c '%T' /dev/shm
tmpfs
You can also check whether the directory is a mountpoint by comparing its device with its parent's.
$ stat -c '%D' /901$ stat -c '%D' /homefe01$ stat -c '%D' /home/$USERfe01
$ stat -c '%D' /
901
$ stat -c '%D' /home
fe01
$ stat -c '%D' /home/$USER
Want to be a Linux expert? Come and join this Linux course
31k questions
32.8k answers
501 comments
693 users