Disk usage
How do I find out which directories are taking up the most space?
To see the amount of disk space required for each directory, copy and paste this into your unix prompt:
While in /afs/isis/depts/cpc/projects/usda/:
du -k . | grep -v OldFiles | sort -n -r | moreWhile on gromit in:
/usda/ du -k . | sort -n -r | moreExplanation:
- " du -k . " is a unix command that tells how much disk space is being used in the current directory. The period means current directory. The "-k" means display in kilobytes.
- The vertical bar " | " (located on your keyboard under the backspace key) means pipe this through to the next command.
- (Statapps only) " grep -v OldFiles " means sort through the list generated by the disk usage command and don't show the lines that contain the string "OldFiles" (the OldFiles directory is the backups of all the files so it doesn't count in our disk usage).
- " sort -n -r " sorts the list. " -n " means numerically instead of by character sort; " -r " means reverse the order so that the largest numbers appear first.
- " more " means page through the results to see more than one screen's worth.


