< Linux < Basic commands 
      du [1][2] (abbreviated from disk usage) is a standard Unix program used to estimate file space usage—space used under a particular directory or files on a file system.
du examples
- du -h --max-depth=1 | sort -hror- du -h -d 1 | sort -hr
- du -sh -- *
- du -ah --exclude="*.txt" /tmp/
- Display only current File system: du -ha -x /tmp/
- du -ha --time /tmp/
- Files larger than 100M: du -h -t 100M -a /tmp
Activities
- Learn about duusage:
- -a, In addition to the default output, include information for each non-directory entry
- -c, display a grand total of the disk usage found by the other arguments
- -d #, the depth at which summing should occur. -d 0 sums at the current level, -d 1 sums at the subdirectory, -d 2 at sub-subdirectories, etc.
- -H, calculate disk usage for link references specified on the command line
- -k, show sizes as multiples of 1024 bytes, not 512-byte
- -L, calculate disk usage for link references anywhere
- -s, report only the sum of the usage in the current directory, not for each directory therein contained
- -x, only traverse files and directories on the device on which the pathname argument is specified.
See also
- CompTia Linux Administration/Commands/File Management
- df: df -h, df -hi (inodes)
- findand- ls
- journalctl --disk-usage
    This article is issued from Wikiversity. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.