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

Linux服务器
linux下用cron定时执行任务的方法
.htaccess绑定域名到子目录的方法
linux apache下虚拟主机配置方法
apache 局域网访问配置方案
linux Apache服务器系统安全设置与优化
linux中mac地址绑定方法
linux托盘不断闪烁之解决方法
Apache配置 虚拟转向实例
Apache No space left on device的解决办法
Apache rewrite的重写相关的参数说明
LINUX入门级常用命令20条整理
Ubuntu设置开机自动挂载所有格式硬盘分区
5个可能被你忽略的Linux安全设置方法
学习Apache的mod rewrite、access写法
改版时保留原链接,创建新的URL的方法
rsync中文手册之使用rsync实现网站镜像和备份linux
rsync 数据同步使用详解
linux URL的301重定向代码分析
eclipse3.2.2 + MyEclipse5.5 + Tomcat5.5.27 配置数据库连接池
Apache服务器二级域名的完美实现

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


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