First page Back Continue Last page Overview Graphics
Measuring disc usage
Caution: different from file size!
du -h <file> (disk usage)
-h: returns size on disk of the given file, in human readable format: K (kilobytes), M (megabytes) or G (gigabytes), . Without -h, du returns the raw number of disk blocks used by the file (hard to read).
Note that the -h option only exists in GNU du.
du -sh <dir>
-s: returns the sum of disk usage of all the files in the given directory.