使用ls -lht命令显示当前目录下的所有文件,其中有一列就是显示这个文件的大小。 如果要看一个文件夹的大小,可以用du -sh * root@WinJay:/var/www# ls -lht ls: error initializing month strings total 68M -rw-r--r--1 root root 68M 8月 9 10:00 www.zip drwxr-xr-x 16 root root 12K 7月 14 14:04 bug drwxr-xr-x 44 root root 4.0K 5月 29 14:47 moodle drwxrwxrwx 7 root root 4.0K 5月 28 15:15 ecoder drwxr-xr-x 6 root root 4.0K 5月 14 16:49 ppt drwxr-xr-x 5 root root 4.0K 7月 25 2012 wordpress -rw-r--r-- 1 root root 481 6月 29 2012 find.c drwxr-xr-x 12 root root 4.0K 6月 26 2012 clickheat -rwxrwxrwx 1 root root 177 6月 26 2012 index.html root@WinJay:/var/www# du -sh bug 17Mbug root@WinJay:/var/www#
版权归属:
WinJay
本文链接:
https://winjay.cn/?p=92
许可协议:
本文使用《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》协议授权
评论区