Linux查看文件和文件夹大小spa
一、du -sh 查看当前文件夹大小orm
du -sh * | sort -n 统计当前文件夹(目录)大小,并按文件大小排序排序
附送:
du -sk filename 查看指定文件大小hash
二、 Linux:ls以K、M、G为单位查看文件大小it
#ls -lhsfile
举例比较:统计
# ls
cuss.war nohup.outsort
# ls -l
total 30372
-rw-r--r-- 1 root root 31051909 May 24 10:07 cuss.war
-rw------- 1 root root 0 Mar 20 13:52 nohup.outmargin
# ls -lh
total 30M
-rw-r--r-- 1 root root 30M May 24 10:07 cuss.war
-rw------- 1 root root 0 Mar 20 13:52 nohup.outtop
# ll -h
total 30M
-rw-r--r-- 1 root root 30M May 24 10:07 cuss.war
-rw------- 1 root root 0 Mar 20 13:52 nohup.out
# ls -lhs总计 28G15G -rw-r--r-- 1 root root 15G 06-04 14:35 all.txt8.0K -rwx--x--x 1 root root 632 06-04 15:57 hash.pl