How to display the file system type using the ls command in Linux

Published on Aug. 22, 2023, 12:17 p.m.

The ls command in Linux does not display the file system type by default, but you can use the -T option to display the file system type of a particular file or directory. Here is an example command to display the file system type of the current directory:

ls -lT .

This will display the details of the current directory, including its file permissions, owner, size, modification time, link count and file system type (in parentheses).

Alternatively, you can use the df command to display information about the file system type and disk usage of mounted file systems. Here is an example command to display the file system type of the file system containing the current directory:

df -T .

This will display the file system type and disk usage information of the file system containing the current directory.

Note that the file system type is determined by the type of file system used on the disk or partition, such as ext4, xfs, ntfs, or fat32. The file system type can affect performance and compatibility with other operating systems or file systems, so it can be helpful to know which file system type is being used on a particular disk or partition.

Tags:

ls