Centos7查看当前目录下的文件大小

Centos7查看当前目录下的文件大小

[root@extend-07 back]# ll -h
总用量 452K
-rwxrwxrwx 1 root root   90 Dec 23 18:59 ApiProductSaveJob.txt
drwxrwxrwx 2 root root    0 Mar  1 14:46 app
-rwxrwxrwx 1 root root 1.7K Sep 10  2019 artisan
drwxrwxrwx 2 root root    0 Jan 15 15:45 bootstrap
-rwxrwxrwx 1 root root 2.1K Mar  1 11:09 composer.json
-rwxrwxrwx 1 root root 343K Mar  1 11:09 composer.lock
drwxrwxrwx 2 root root    0 Feb  2 10:22 config
-rwxrwxrwx 1 root root 308K Jan 19 11:36 ctags.exe
drwxrwxrwx 2 root root    0 Sep 10  2019 database
-rwxrwxrwx 1 root root 2.5M Feb 19 18:40 dcat_admin_ide_helper.php
-rwxrwxrwx 1 root root 1.2K Feb  4 15:52 nohup.out
-rwxrwxrwx 1 root root 1.1K Sep 10  2019 package.json
-rwxrwxrwx 1 root root 1.2K Sep 10  2019 phpunit.xml
-rwxrwxrwx 1 root root  123 Dec 22 10:04 product.txt
drwxrwxrwx 2 root root    0 Mar  1 18:38 public
-rwxrwxrwx 1 root root 4.1K Sep 10  2019 readme.md
drwxrwxrwx 2 root root    0 Sep 10  2019 resources
drwxrwxrwx 2 root root    0 Jan 18 15:33 routes
-rwxrwxrwx 1 root root  563 Sep 10  2019 server.php
drwxrwxrwx 2 root root    0 Feb  1 14:26 storage
drwxrwxrwx 2 root root    0 Sep 10  2019 tests
drwxrwxrwx 2 root root    0 Mar  1 11:09 vendor
-rwxrwxrwx 1 root root  538 Sep 10  2019 webpack.mix.js

查看指定目录大小

[root@bogon laravel5]# du -sh /www/wwwroot/textlaravel.cc/laravel5
322M	/www/wwwroot/textlaravel.cc/laravel5

查看指定目录下的子目录大小

[root@bogon laravel5]# du -h --max-depth=1 /www/wwwroot/textlaravel.cc/laravel5
34K	/www/wwwroot/textlaravel.cc/laravel5/.idea
556K	/www/wwwroot/textlaravel.cc/laravel5/app
25K	/www/wwwroot/textlaravel.cc/laravel5/bootstrap
128K	/www/wwwroot/textlaravel.cc/laravel5/config
46K	/www/wwwroot/textlaravel.cc/laravel5/database
30M	/www/wwwroot/textlaravel.cc/laravel5/public
93K	/www/wwwroot/textlaravel.cc/laravel5/resources
9.5K	/www/wwwroot/textlaravel.cc/laravel5/routes
53M	/www/wwwroot/textlaravel.cc/laravel5/storage
9.5K	/www/wwwroot/textlaravel.cc/laravel5/tests
236M	/www/wwwroot/textlaravel.cc/laravel5/vendor
322M	/www/wwwroot/textlaravel.cc/laravel5
``

看某个目录下所有文件及文件夹的大小
[root@bogon laravel5]# du -sh *
512	ApiProductSaveJob.txt
556K	app
4.0K	artisan
25K	bootstrap
4.0K	composer.json
344K	composer.lock
128K	config
308K	ctags.exe
46K	database
2.5M	dcat_admin_ide_helper.php
4.0K	nohup.out
4.0K	package.json
4.0K	phpunit.xml
512	product.txt
30M	public
8.0K	readme.md
93K	resources
9.5K	routes
1.0K	server.php
53M	storage
9.5K	tests
236M	vendor
1.0K	webpack.mix.js
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值