手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

du :Disk Usage 命令

[日期:2011-07-13] 来源:bentutu.com  作者: tuhaihe [字体:大 中 小]

内容简介:文章专门介绍的命令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.

Here’re a few basic du commands frequently used.

du -a

du –all shows all files and directories included in currently opening directory.

du -h

du –human-readable views file and directory sizes with readable by human in KB, MB, and GB.

du -s

du –summarize display only a total for each argument.

du -S

du -separate-dirs command don’t include sub-directories sizes.

du --time

Shows the last time modifications for each file, directory and sub-directories as well.

Check more du commands by typing

du --help

Few du advanced commands

Search current directory and sub-directories for biggest files

find -type f -exec du -sh {} +  | sort -rh | head

Shows file, directory and sub-directory sizes including hidden files with increase sorting.

du -sk .[!.]* *| sort -n

Shows file, directory and sub-directory sizes including hidden files with decrease sorting.

du -sk .[!.]* *| sort -nr
linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款