Polecenia Linuksa

Linux df Command

Linux df Command

The “df” is a standard command in Linux, and Unix-like systems termed “Disk Filesystem.” It is used to display consumed and available disk space for the specific file system.

Whenever you run this Linux command-line utility, it displays the amount of used and available blocks, total disk space, and a summary of where the file system is mounted.

In short, the dubbed “df” command is a helpful tool to get disk space information having file name arguments.

df Command Syntax:

Syntax of the “df” command-line tool is:

df [Options]… [File]…

df Command:

Execute the “df” command in the terminal without any filename. It will print the complete statistics of disk space in tabular form, including total, used, available, and the root directory where files are mounted on.

$ df

df Command Options:

Several options come under the flag of the “df” command.

Print File System Type:

When we use the “-T” option in the terminal, it will print the machine's file system type in output.

$ df -T

As you can see, a new column “Type” is displayed on the terminal with other information.

Include Particular File System Type:

In the “-T” option's section (mentioned above), we have seen a column containing file system type. Select any specific file system type if you want to display its output separately. For this “-t” option is used. When you used this option with file-name, it will print the output of that particular file system.

For example, if we want to print the disk space information of the file system “devtmpfs.” So, the command would be:

$ df -t devtmpfs

Exclude Particular File System Type:

To exclude any particular file system type from the result, use the “-x” option with the file type. Once you execute this command option, it will print all other file system types except this particular one.

For example, if we want to exclude the “devtmpfs” file type from the output, the command would be:

$ df -x devtmpfs

Display Output in Human readable form:

The “df” command is a user-friendly tool; it supports an easily readable option for humans. For this, use the “-h” option in the command-line, and the output displayed on the terminal will be understandable for the human.

You can see, it displayed the size of powers GBs as G, MBs as M, and KBs as K. Now, it is easy to understand the output.

Display Inode Information:

The “-i” option is used to show Inode information in the terminal instead of disk space information. When you run this option, it will show the “Inode” column along with “IUsed” and “IFree” columns.

$ df -i

Display Grand Total Size:

Use the “-total” option to print the total for size, availability, and used space.

$ df --total

Print Help Message:

The “help” option is used to print the help message about the “df” command and its supported options.

$ df --help

Display Version:

To print version information of the “df” command tool, use the “version” option.

$ df --version

Some Other Useful Options:

Conclusion:

The “df” is a standard tool to display disk space information in Linux-like systems. It is abbreviated as “Disk Filesystem.” This tutorial has included a detailed note about the working of the “df” command in the terminal and listed its several options.

Emulate Mouse clicks by hovering using Clickless Mouse in Windows 10
Using a mouse or keyboard in the wrong posture of excessive usage can result in a lot of health issues, including strain, carpal tunnel syndrome, and ...
Add Mouse gestures to Windows 10 using these free tools
In recent years computers and operating systems have greatly evolved. There was a time when users had to use commands to navigate through file manager...
Control & manage mouse movement between multiple monitors in Windows 10
Dual Display Mouse Manager lets you control & configure mouse movement between multiple monitors, by slowing down its movements near the border. Windo...