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

Linux服务器
routeros的简单使用说明
ROS基本的设置向导之一
ROS基本的设置向导之二
ROS基本的设置向导之三
ROS基本的设置向导之四
使用ROS过滤网址和关键字
MikroTikRouterOS简介
RouterOS双线负载均衡
RouterOS的详细的设置方法
利用RouterOSVRRP配置路由器热备份
ROS专业企业软件路由防火墙功能介绍
软路由Routeros安装经典实例
Routeros2.96网通和电信策略路由表
一个完整的ftp远程批量shell
防止邮件服务器被滥用
Linux对象存储文件系统的技术架构研究
apache中禁止mp3试听
routeros端口映射方法
如何用ROUTEROS封闭P2P类软件
全面解决ROUTEROSIP限速问题

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


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