Determining Disk Usage with du

Another piece of information that you can access is how much disk space within the Unix system is in use. You can do so using du, as shown in Code Listing 7.5.

To Determine Disk Usage with du:

  • du

    At the shell prompt, enter du. As Code Listing 7.5 shows, you’ll get information about disk usage in the current directory as well as in all subdirectories. The numbers are usually measured in 1 Kbyte blocks (as with df). You can actually read the output by using du -h.

✓ Tips

  • If you’re on a system that enforces disk space quotas (as most ISPs do), you can find out what your quota is and how close you are to reaching it. Just type quota -v at the shell prompt.

  • You can use du with a path name to check the disk usage in just ...

Get Unix Third Edition: Visual Quickstart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.