LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
12
返回列表 发新帖
楼主: nathaniel

在console下用什么命令查看文件夹的大小??

[复制链接]
发表于 2004-8-28 08:19:29 | 显示全部楼层
不过个人感觉du -sh并不能准确显示fat32下的文件夹

同一个文件夹用du看只有860M,而到win2k下看发现其大小1.27G,占用空间1.30G

而且文件夹越大差别越明显,不知你们有没有这种情况?
发表于 2004-8-28 12:27:05 | 显示全部楼层
:sorry

打错了

订正:


jia@hua:~$ du --help
用法: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
      --help     显示此帮助信息并离开
      --version  显示版本信息并离开

<大小>可以是以下的单位 (单位前可加上整数):
kB=1000,K=1024,MB=1000000,M=1048576,还有 G、T、P、E、Z、Y 如此类推。

Report bugs to <bug-coreutils@gnu.org>.
jia@hua:~$
发表于 2004-8-28 12:27:05 | 显示全部楼层
:sorry

打错了

订正:


jia@hua:~$ du --help
用法: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
      --help     显示此帮助信息并离开
      --version  显示版本信息并离开

<大小>可以是以下的单位 (单位前可加上整数):
kB=1000,K=1024,MB=1000000,M=1048576,还有 G、T、P、E、Z、Y 如此类推。

Report bugs to <bug-coreutils@gnu.org>.
jia@hua:~$
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表