3

On Ubuntu 14.04, I am checking the ext4 filesystem for my home based on a file new in it:

$ stat -f new
  File: "new"
    ID: 38d4cd29e44142c6 Namelen: 255     Type: ext2/ext3
Block size: 4096       Fundamental block size: 4096
Blocks: Total: 144152970  Free: 79424314   Available: 72095994
Inodes: Total: 36626432   Free: 35430143

why does stat -f show the file system type is ext2/ext3 while my home filesystem type is ext4?

Pandya
  • 24,618
Tim
  • 101,790

1 Answers1

3

Strictly speaking stat -f doesn't differentiate between ext2, ext3 and ext4. Instead, it just shows them as ext2/ext3 and probably ext2/ext3/ext4.

So, it is not good ideat to use stat -f to check specific ext type file-system. You can use df -T from coreutils for such purpose.

From manpage:

NAME
       df - report file system disk space usage

       -T, --print-type
              print file system type
Pandya
  • 24,618