Linux下查看文件和文件夹大小的df和du命令
liweihui@liweihui-desktop:~/Documents/zbs$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 71G 26G 43G 38% / varrun 759M 116K 759M 1% /var/run varlock 759M 0 759M 0% /var/lock udev 759M 44K 759M 1% /dev devshm 759M 384K 759M 1% /dev/shm lrm 759M 40M 720M 6% /lib/modules/2.6.24-27-generic/volatile gvfs-fuse-daemon 71G 26G 43G 38% /home/liweihui/.gvfs
--max-depth表示深入目录的层次,如果不指定,则会一直迭代
liweihui@liweihui-desktop:~/Documents/zbs$ du -h --max-depth=1 1.8M ./app 1.1M ./spec 36K ./bat_tasks 224K ./features 39M ./.git 15M ./db 20K ./test 8.0K ./doc 3.7M ./lib 9.7M ./vendor 268K ./config 260K ./index 132M ./log 108K ./script 24M ./public 225M .
相关推荐
linux 查看磁盘命令 du df. ② df -h: 查看每个根路径的分区大小。④ du -sm[ 目录名]: 返回该文件夹总 MB 数。⑤ du -h[目录名]: 查看指定文件夹下的所有文件大小
hnllei 2020-04-18
linuxhh 2020-04-14
andyzhaojianhui 2014-03-19
zyccsdn 2015-03-25
NeverAgain 2019-11-07
LinuxCard 2016-04-11
留百叶 2017-08-31
lonesomer 2016-07-07
zyccsdn 2015-03-25
wutongyuq 2014-11-19
xufuangchao 2014-02-18
atb 2012-12-17
withwu 2012-11-09
LinuxWorking 2012-08-13
yangxiang 2012-02-15
libowenhit 2011-11-06
eastnow 2011-10-20
codedecode 2011-09-11