du -sh //list current dir blocksize
[root@localhost target]# du -sh
32M .
[root@localhost target]#
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]#
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/
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]#
总计 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]#
[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
3995

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



