How To See Characteristics of File Systems on Linux or Unix

How do I display the characteristics of file systems such as inodes, blocks, block size, file system name, state, lifetime writes, fsck status and more on Linux or Unix-like operating system?

You can use any one of the following command as per your Linux or Unix variant:
=> tune2fs command
=> lsfs command
=> fstyp command
=> df command


Linux show file system characteristics

Pass the -l option to list the contents of the filesystem superblock, including the current values of the parameters that can be set via tune2fs command. Type the following command:
# tune2fs -l /path/to/device | more
# tune2fs -l /dev/sda2 | grep
# tune2fs -l /dev/cciss/c1d1p1
# tune2fs -l /dev/mapper/data

Sample outputs:

Fig.01: tune2fs command in action

Fig.01: tune2fs command in action

You can use grep command to filter out information. For example, to see lifetime writes on ext4 filesystem, enter:
# tune2fs -l /dev/md0 | grep 'writes'
Sample outputs:

Lifetime writes:          90 GB

A note about HP-UX specific command

The fstyp command allows the user to determine the file system type of a mounted or unmounted file system. You need to pass special a device special file such as /dev/dsk/c1t6d0 and -v option to see information about the file system’s superblock.
# fstyp -v /dev/vg02/lvol2
# fstyp -v /dev/dsk/c1t6d0 | more
# df -g /dev/vg02/lvol2

The ‘df -g‘ command the entire structure of the file system.

A note about Solaris Unix to see the file system characteristics

Type the following command:
# fstyp -v /dev/md/dsk/d200
# fstyp -v /dev/md/dsk/d200 | more
# df -g /dev/md/dsk/d200

A note about AIX unix specific command

The lsfs command displays characteristics of file systems, such as mount points, automatic mounts, permissions, and file system size. The FileSystem parameter reports on a specific file system:
# lsfs -q /dev/hd10admin
# lsfs -q / | more

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04

2 comments… add one
  • aL Oct 28, 2015 @ 7:28

    a description of what all those characteristics means would be neat :)

  • Miguel Nov 20, 2015 @ 8:12

    And for XFS?

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.