Linux:ls以K、M、G为单位查看文件大小
#man ls
……
-h, --human-readable
print sizes in human readable format (e.g., 1K 234M 2G)
……
# ls
cuss.war nohup.out www.2cto.com
# 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.out
# 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.out
# 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
本文介绍了如何在Linux系统中使用ls命令的-h选项来以人类可读的格式(K、M、G)查看文件大小。通过示例展示了如何显示文件大小的详细信息,并对比了不同选项的效果。
2万+

被折叠的 条评论
为什么被折叠?



