Frequent Question: How Do I Check Disk Usage in Unix?
Contents

Unix command to check disk space: df command – Shows the amount of disk space used and available on Unix file systems. du command – Display disk usage statistic for each directory on Unix server.

How do I see disk usage in Linux?

Linux command to check disk space using:

  1. df command – Shows the amount of disk space used and available on Linux file systems.
  2. du command – Display the amount of disk space used by the specified files and for each subdirectory.

How do I clear disk space in Linux?

Freeing disk space on your Linux server

  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.
Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest