Long commands are perfect candidates to be turned into an alias. Let’s ask df to report on the first partition on the first drive, with human readable numbers, and with the columns source, fstype, size, used, avail, and pcent: df -h /dev/sda1 -output=source,fstype,size,used,avail,pcent target: The mount point for the filesystem.file: The filesystem name if specified on the command line.pcent: The percentage of used space on the filesystem in inodes, by default in 1K blocks.avail: The available space on the filesystem, by default in 1K blocks.used: The space used on the filesystem, by default in 1K blocks.size: The size of the filesystem, by default in 1K blocks.ipcent: The percentage of used space on the filesystem in inodes, as a percentage.iavail: The available space on the filesystem in inodes.iused: The space used on the filesystem in inodes.itotal: The size of the filesystem in inodes.Make sure not to include any spaces in the comma separated list. To do so use the -output option and provide a comma-separated list of the required column names.
![linux see free memory linux see free memory](https://image.slidesharecdn.com/linux-memory-120530204253-phpapp02/95/linux-memory-26-728.jpg)
To further customize the display, we can tell df which columns to include. This isn’t going to be useful to the majority of people, but system administrators must sometimes refer to this type of information. On Linux, inodes hold data such as the name, modification date, position on the hard drive, and so on for each file and directory. An inode is a data structure used by Linux filesystems to describe files and to store metadata about them. If you need to see the information represented in numbers of inodes, use the -i (inodes) option. In the next output note that there are filesystems with gigabyte, megabyte and even kilobyte sizes. The -h (human readable) option instructs df to use the most applicable unit for the size of each filesystem. Note there is no space between the B and M. These letters represent the kilo, mega, giga, tera, peta, exa, zeta, and yotta values from the multiple of 1024 scale.įor example, to see the disk usage figures in megabytes, you would use the following command. To use this option, type df, a space, and then -B and a letter from the list of K, M, G, T, P, E, Z or Y. You can replace the 1K block counts with more useful output by using the -B (block size) option. Mounted on: The mount point of the filesystem.File: The filesystem name, if specified on the command line.Use%: The amount of space used in this file system given as a percentage.Available: The number of 1K blocks that are unused on this file system.Used: The number of 1K blocks that have been used on this file system.1K-Blocks: The number of 1K blocks that are available on this filesystem.Fileystem: The name of this filesystem.dfĮach line of the display is made up of six columns. At first glance, it might look impenetrable, but it is quite easy to understand.
![linux see free memory linux see free memory](https://i2.wp.com/akku-monster.de/ebaybilder/p8202_t_335045732_1.jpg)
Using df without any options will display the available and used space for all mounted filesystems.
![linux see free memory linux see free memory](https://img1.wsimg.com/cdn/Image/All/Website/2/en-US/08f7d46b-f7b5-448f-84f0-f15aa1432152/icon-what-is-hosting-235x-v2.png)
You’ll see a lot of output similar to the screenshot below. Type df and press enter in a Bash terminal window to get started. To discover what’s taking up the used disk space, use du (disk usage). To find out the available and used disk space, use df (disk filesystems, sometimes called disk free). Viewing the Total, Available and Used Disk Spaceīash contains two useful commands related to disk space.