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

Linux服务器
Linux下利用Squid构建高速的ProxyServer
在Linux操作系统上配置DNS服务器的日志
搭建性能比Squid高很多的Varnish服务器
Linux系统挂载AIXNFS服务器的配置方法
Linux上架设一台高容量POP3服务器
鸟哥的Linux学习笔记DNS服务器知识
部署Linux下OpenVZ虚拟化服务器
在RHEL5服务器上远程桌面(VNC)的配置
Samba服务器多系统用户共享目录设计方法
Linux攻略Samba服务的搭建与配置
Linux操作系统下配置DNS服务器的方法介绍
用Linux系统自身做一个L2TP的VPN服务器
Linux环境用Sendmail架设Mail服务器
细述Apachewebserver的安装与配置
linux环境下轻松搭建CVS服务器
UbuntuLinux通过SSh远程管理服务器
Linux操作系统下DHCP中继代理的实现方法
Ubuntu7.10Linux上构建全功能的服务器
Linux系统搭建Discuz论坛的方法
Ubuntub7.10Linux架设Samba服务

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


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