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

Linux服务器
apache的access.log和error.log减肥
Ubuntu linux 安装 PHP5.3.0的命令
正确维护配置Apache服务器的方法 保护系统安全
lftp 贴心好友 备份服务器bash脚本
解決安裝了apache却找不到服务的问题
Linux 配置WWW服务器全攻略
给您的U盘安装linux
Linux目录的创建与删除命令
Linux文件的复制、删除和移动命令
实用的Linux网络配置工具netconf
教程精选:正则表达式快速入门
linux root 密码忘了怎么办?
服务器应用:Linux下如何用好新闻组(3)
服务器应用:Linux下如何用好新闻组(2)
服务器应用:Linux下如何用好新闻组(1)
快速搭建Samba服务器
Linux:rsync服务器的快速搭建和使用
Linux服务器上的备份和恢复
为主流服务器操作系统配置Ipv6:IPv4和IPv6技术对比
Linux配置web服务器全攻略

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-30   浏览: 179 ::
收藏到网摘: 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