內容簡介:文章專門介紹的命令du,是Disk Usage命令的首字母縮寫。
常用的有:
du -a
du -h
du -s
du -S
等。
du is a disk usage command allows you to easily know file and directory sizes, also you can view file and directory sizes decreasing starting by biggest file, otherwise increasing by smallest file.
du –all shows all files and directories included in currently opening directory.
du -hdu –human-readable views file and directory sizes with readable by human in KB, MB, and GB.
du -sdu –summarize display only a total for each argument.
du -Sdu -separate-dirs command don’t include sub-directories sizes.
du --timeShows the last time modifications for each file, directory and sub-directories as well.
Check more du commands by typing
du --helpSearch current directory and sub-directories for biggest files
find -type f -exec du -sh {} + | sort -rh | headShows file, directory and sub-directory sizes including hidden files with increase sorting.
du -sk .[!.]* *| sort -nShows file, directory and sub-directory sizes including hidden files with decrease sorting.
du -sk .[!.]* *| sort -nr