Comenzi Linux

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.

Remap your mouse buttons differently for different software with X-Mouse Button Control
Maybe you need a tool that could make your mouse's control change with every application that you use. If this is the case, you can try out an applica...
Microsoft Sculpt Touch Wireless Mouse Review
I recently read about the Microsoft Sculpt Touch wireless mouse and decided to buy it. After using it for a while, I decided to share my experience wi...
AppyMouse On-screen Trackpad and Mouse Pointer for Windows Tablets
Tablet users often miss the mouse pointer, especially when they are habitual to using the laptops. The touchscreen Smartphones and tablets come with m...