lucianovalenca
10/11/2019 - 7:18 PM

Check space

Check disk usage

@link https://www.tecmint.com/check-linux-disk-usage-of-files-and-directories/

To find out the disk usage summary of a /home/tecmint directory tree and each of its sub directories. Enter the command as: (Using “-h” option with “du” command provides results in “Human Readable Format“.) du -h /home/tecmint

Using “-a” flag with “du” command displays the disk usage of all the files and directories. du -a /home/tecmint

To find out where disk space is being used:

  1. Get to the root of your machine by running cd /
  2. Run sudo du -h --max-depth=1
  3. Note which directories are using a lot of disk space.
  4. cd into one of the big directories.
  5. Run ls -l to see which files are using a lot of space. Delete any you don’t need.
  6. Repeat steps 2 to 5.