du_查看文件大小

du -sh   //list current dir blocksize
[root@localhost target]# du -sh
32M     .
[root@localhost target]#
 
du -sh * //list the blocksize of every subcontents in current dir
[root@localhost target]# du -sh *
3.7M    bin
8.0K    boot
4.0K    dev
3.0M    etc
56K     home
16K     include
4.6M    lib
40K     macros_tests.ttm
8.0K    macros.ttm
8.0K    media
8.0K    misc
16K     mnt
8.0K    opt
8.0K    proc
14M     root
2.3M    sbin
8.0K    sys
8.0K    tmp
4.1M    usr
28K     var
[root@localhost target]#
 
du -sh bin/  //list the size of subdir of bin
[root@localhost target]# du -sh bin/
3.7M    bin/
[root@localhost target]#
 
也可以用 ls -lah
[root@localhost target]# ls -lah
总计 200K
drwxr-xr-x 20 root root 4.0K 05-05 14:21 .
drwxr-xr-x 16 root root 4.0K 05-05 14:30 ..
drwxr-xr-x  2 root root 4.0K 05-04 14:02 bin
drwxr-xr-x  2 root root 4.0K 05-04 13:14 boot
drwxr-xr-x  2 root root 4.0K 05-04 16:23 dev
drwxr-xr-x 34 root root 4.0K 05-05 09:31 etc
drwxr-xr-x  4 root root 4.0K 05-04 09:07 home
drwxr-xr-x  3 root root 4.0K 03-16 09:25 include
drwxr-xr-x  3 root root 4.0K 05-04 14:34 lib
-rwxr-xr-x  1 root root  37K 04-15 18:38 macros_tests.ttm
-rwxr-xr-x  1 root root 7.2K 04-15 18:40 macros.ttm
drwxr-xr-x  2 root root 4.0K 2009-05-26 media
drwxr-xr-x  2 root root 4.0K 2009-04-30 misc
drwxr-xr-x  4 root root 4.0K 04-19 14:50 mnt
drwxr-xr-x  2 root root 4.0K 03-16 15:19 opt
drwxr-xr-x  2 root root 4.0K 2009-01-10 proc
drws------  3 root root 4.0K 05-04 11:17 root
drwxr-xr-x  2 root root 4.0K 05-04 14:53 sbin
drwxr-xr-x  2 root root 4.0K 2009-01-10 sys
drwxrwxrwt  2 root root 4.0K 05-04 13:44 tmp
drwxr-xr-x  6 root root 4.0K 05-04 11:52 usr
drwxr-xr-x  4 root root 4.0K 05-04 15:21 var
[root@localhost target]#
 
或者ll
[root@localhost target]# ll
总计 184
drwxr-xr-x  2 root root  4096 05-04 14:02 bin
drwxr-xr-x  2 root root  4096 05-04 13:14 boot
drwxr-xr-x  2 root root  4096 05-04 16:23 dev
drwxr-xr-x 34 root root  4096 05-05 09:31 etc
drwxr-xr-x  4 root root  4096 05-04 09:07 home
drwxr-xr-x  3 root root  4096 03-16 09:25 include
drwxr-xr-x  3 root root  4096 05-04 14:34 lib
-rwxr-xr-x  1 root root 37561 04-15 18:38 macros_tests.ttm
-rwxr-xr-x  1 root root  7347 04-15 18:40 macros.ttm
drwxr-xr-x  2 root root  4096 2009-05-26 media
drwxr-xr-x  2 root root  4096 2009-04-30 misc
drwxr-xr-x  4 root root  4096 04-19 14:50 mnt
drwxr-xr-x  2 root root  4096 03-16 15:19 opt
drwxr-xr-x  2 root root  4096 2009-01-10 proc
drws------  3 root root  4096 05-04 11:17 root
drwxr-xr-x  2 root root  4096 05-04 14:53 sbin
drwxr-xr-x  2 root root  4096 2009-01-10 sys
drwxrwxrwt  2 root root  4096 05-04 13:44 tmp
drwxr-xr-x  6 root root  4096 05-04 11:52 usr
drwxr-xr-x  4 root root  4096 05-04 15:21 var
[root@localhost target]#

. //means the current dir
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值