linux disk usage command-du

$ man du


NAME
       du - estimate file space usage

SYNOPSIS
       du [OPTION]... [FILE]...
       du [OPTION]... --files0-from=F

DESCRIPTION
       Summarize disk usage of each FILE, recursively for directories.

       Mandatory arguments to long options are mandatory for short options too.

       -a, --all
              write counts for all files, not just directories

       --apparent-size
              print  apparent  sizes,  rather than disk usage; although the apparent size is usually smaller, it may be larger due to holes in ('sparse') files, internal fragmenta-
              tion, indirect blocks, and the like

       -B, --block-size=SIZE use SIZE-byte blocks

       -b, --bytes
              equivalent to '--apparent-size --block-size=1'

       -c, --total
              produce a grand total

       -D, --dereference-args
              dereference FILEs that are symbolic links

       --files0-from=F
              summarize disk usage of the NUL-terminated file names specified in file F

       -H     like --si, but also evokes a warning; will soon change to be equivalent to --dereference-args (-D)

       -h, --human-readable
              print sizes in human readable format (e.g., 1K 234M 2G)

       --si   like -h, but use powers of 1000 not 1024

       -k     like --block-size=1K

       -l, --count-links
              count sizes many times if hard linked

       -m     like --block-size=1M

       -L, --dereference

 

如果想以G为单位显示当前文件夹下的文件及文件夹大小:

$ du -a -B g . (或者 du -sh .)

2G      ./SRR057636_2.fastq
5G      ./SRR057631.fastq.sam
3G      ./SRR057638_1.fastq
3G      ./SRR057638_2.fastq
3G      ./SRR057639_1.fastq
3G      ./SRR057639_2.fastq
3G      ./SRR057640_1.fastq
3G      ./SRR057640_2.fastq
3G      ./SRR057641_1.fastq
3G      ./SRR057641_2.fastq
3G      ./SRR057642_1.fastq
3G      ./SRR057642_2.fastq
4G      ./SRR057643_2.fastq
3G      ./SRR057644_2.fastq
3G      ./SRR057645_2.fastq
3G      ./SRR057646_2.fastq
2G      ./SRR057647_2.fastq
2G      ./SRR057629.fastq.sam
1G      ./SRR057632.fastq.sam
128G    .

posted on 2011-11-29 15:37 ewre 阅读(377) 评论(0)  编辑 收藏 引用 所属分类: Scripting languageBioinformatics


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


导航

<2024年11月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

留言簿(2)

文章分类

文章档案

最新评论

阅读排行榜