当前位置: 首页 > 图文教程 > 服务器 > Linux服务器 > Linux下查看某目录或指定文件大小的命令

Linux服务器
在Linux环境中如何配置WU-FTP服务器
Linux系统上架设VSFTP服务器实例解析
Linux中使用有状态防火墙实现FTP功能
教你如何搭建简易的Linux局网服务器
使用 Nginx 提升网站访问速度
Linux 服务器日志文件查找技巧精粹
如何在 Ubuntu 8.04 上安装KDE 4.1
基于Linux系统的Nagios网络管理模块的实现
如何使Sendmail邮件服务器的邮件用户与系统用户分离
Apache重负荷服务器应如何优化
两台linux服务器之间用RSA键对的方法SSH/SCP不需密码
在局域网中设置Linux时间服务器
构建简单易用的FAX服务器
架设Squid代理服务器
Linux服务器的一些基本应用
建立Linux下的RADIUS服务器
RedHat8.0服务器配置方案(DNS)
如何编写Linux下的客户机/服务器软件
全球信息网服务器(WebServer)
匿名(垃圾)邮件的根源—网络上几乎所有服务器都不可避免的“漏洞”

Linux服务器 中的 Linux下查看某目录或指定文件大小的命令


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-30   浏览: 199 ::
收藏到网摘: n/a

du -sh 文件或目录名

用法:du [选项]... [文件]...

总结每个<文件>的磁盘用量,目录则取总用量。

长选项必须用的参数在使用短选项时也是必须的。

-a, --all write counts for all files, not just directories

-B, --block-size=SIZE use SIZE-byte blocks

-b, --bytes print size in bytes

-c, --total produce a grand total

-D, --dereference-args dereference FILEs that are symbolic links

-h, --human-readable 以容易理解的格式印出文件大小 (例如 1K 234M 2G)

-H, --si 类似 -h,但取 1000 的次方而不是 1024

-k 即 --block-size=1K

-l, --count-links 连硬链接的大小也计算在内

-L, --dereference 找出任何符号链接指示的真正目的地

-S, --separate-dirs 不包括子目录的占用量

-s, --summarize 只分别计算命令列中每个参数所占的总用量

-x, --one-file-system skip directories on different filesystems

-X FILE, --exclude-from=FILE Exclude files that match any pattern in FILE.

--exclude=PATTERN Exclude files that match PATTERN.

--max-depth=N print the total for a directory (or file, with --all)

only if it is N or fewer levels below the command

line argument; --max-depth=0 is the same as

--summarize