Linux下查看某目錄或指定文件大小的命令 |
發(fā)布時(shí)間: 2012/8/11 10:01:20 |
du -sh 文件或目錄名
用法:du [選項(xiàng)]... [文件]... 總結(jié)每個(gè)<文件>的磁盤用量,目錄則取總用量。 長(zhǎng)選項(xiàng)必須用的參數(shù)在使用短選項(xiàng)時(shí)也是必須的。 -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 連硬鏈接的大小也計(jì)算在內(nèi) -L, --dereference 找出任何符號(hào)鏈接指示的真正目的地 -S, --separate-dirs 不包括子目錄的占用量 -s, --summarize 只分別計(jì)算命令列中每個(gè)參數(shù)所占的總用量 -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 本文出自:億恩科技【www.allwellnessguide.com】 服務(wù)器租用/服務(wù)器托管中國(guó)五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM] |