Disk space is always a limited resource. We monitor disk usage to know when it's running low, then search for large files or folders to delete, move, or compress. This recipe illustrates disk monitoring commands.
Monitoring disk usage
Getting ready
The du (disk usage) and df (disk free) commands report disk usage. These tools report what files and folders are consuming disk space and how much space is available.
How to do it...
To find the disk space used by a file (or files), use the following command:
$ du FILENAME1 FILENAME2 ..
Consider this example:
$ du file.txt
To obtain the disk usage for all...