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

Linux服务器
Linux作为DHCP服务器
redhat8.0自带sendmail配置认证服务器,以及升级sendmail
Web服务器日志统计分析完全解决方案
Linux网络编程--3.服务器和客户机的信息函数
Linux网络编程--9.服务器模型
配置系统时间和时间服务器
搭建简单的Linux局域网服务器
一起学远程控制你的Windows服务器
用Linux架设FTP服务器(1)
用Linux架设FTP服务器(2)
用Linux架设FTP服务器(3)
用Linux架设FTP服务器(4)
用Linux架设FTP服务器(5)
用Linux架设FTP服务器(6)
Linux下Sendmail邮件服务器转发功能的讲解
LinuxApacheWeb服务器终极教程
Apache服务器配置全攻略(一)
Linux下的代理服务器设置
网络应用:FTP服务器匿名用户上传文件的配置
Linux服务器日志管理详解

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


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