前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Linux下查看某目录或指定文件大小的命令

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

作者头像
cloudskyme
发布2018-03-20 11:14:52
5.4K0
发布2018-03-20 11:14:52
举报
文章被收录于专栏:cloudskymecloudskyme

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

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2011-01-09 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档