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

Linux服务器
Apache+PHP和Tomcat网页乱码问题
httpd.conf设置二级域名
SSH登录工具常用命令
对Linux系统进程进行监控和保护
如何清除代理服务器cache记录?
清除Linux代理服务器上cache记录
ssh远程登录的安全设置
Linux系统下最强大的磁盘管理技术LVM
教你搭建一个安全的Linux服务器
如何在Linux系统下实现Apache与Tomcat整合
虚拟机嵌入式Linux开发前要做什么?
修改Linux系统手动分区后的挂载
Linux系统中邮件用户绰号的超能力
Linux操作系统下使用变量为文件重新命名备份
Linux磁盘设备文件混乱源于Linux内核自身
Linux系统防黑客从辨认黑客做起
修改.htaccess文件提升网站访问速度方法
Linux认证:UbuntuNativePOSIX线程库
Linux服务器:邮件系统的原理
linux入侵常用命令汇编

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


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