zoukankan      html  css  js  c++  java
  • Linux下查看某目录或指定文件大小的命令

    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

    作者:张锋
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须在文章页面给出原文连接,否则保留追究法律责任的权利。
    更多精彩文章可以观注
    微信公众号 soft张三丰

    微信交流群,添加群主微信,邀请入群
  • 相关阅读:
    多态
    重载 特点
    java 测量运行时间 单位:毫秒
    java 源代码 二分查找 Arrays
    java 同步 synchronized
    云服务器,价格其实不便宜,但为什么还要用呢
    网站访问优化(二):开启apache服务器gzip压缩
    CXF整合Spring开发WebService
    网站访问优化,未完待续
    网站访问优化,未完待续
  • 原文地址:https://www.cnblogs.com/skyme/p/1931208.html
Copyright © 2011-2022 走看看