ITEM: AI3984L

How much space is being allocated on a sub-directory?



Question:

ENV:    AIX 3.2.5
DESC:   Customer needs to know how much physical disk space a
        directory is taking up.
ACT:    The customer ran the ls -l command and wants to know what 
        the "total" number means.

        ls -l shows:

total 88
-rw-------   1 michelle system      6012 Mar 24 18:11 LVM_SA_PVMISS
-rw-------   1 michelle system      1881 Mar 24 18:10 MD5.checksum
-rw-r--r--   1 michelle system      7008 Mar  9 11:14 daemon.info
-rw-------   1 michelle system     23942 Mar  8 08:05 jfs.internals
-rw-r--r--   1 michelle system         0 Apr 21 14:29 new
lrwxrwxrwx   1 michelle system         3 Apr 21 14:29 test -> new

        The 'total' number shows how many blocks are allocated for
        the directory.  If you take and multiple the number
        by 512 bytes then you will have the total number of bytes the
        directory and its contents are physically taking up.

        Physical disk space for files/directories are allocated in
        chunks of 4K.  If a file is created with 5bytes of data it
        still takes up 4K of disk space.  If a file is a little larger
        than 4K it will allocated another 512 block, thus taking
        up 8K.

        If you run di on the directory the output will look like this:

-rw-------    1 michelle      16B  Mar 24 18:11  Apr 03 16:41 LVM_SA_PVMISS
-rw-------    1 michelle       8B  Mar 24 18:10  Apr 03 16:41 MD5.checksum
-rw-r--r--    1 michelle      16B  Mar 09 11:14  Apr 03 16:41 daemon.info
-rw-------    1 michelle      48B  Mar 08 08:05  Apr 03 16:41 jfs.internals
-rw-r--r--    1 michelle       0B  Apr 21 14:29  Apr 21 14:29 new
lrwxrwxrwx    1 michelle       0B  Apr 21 14:29  Apr 21 14:29 test

        The fourth column shows you how many blocks are allocated
        to each file.  The total for the directory is what's shown
        when you to an ls -l or li -l.  Notice links are not allocated
        any blocks.

NEXT:   Closing call.
TEST:    none.


Support Line: How much space is being allocated on a sub-directory? ITEM: AI3984L
Dated: May 1995 Category: N/A
This HTML file was generated 99/06/24~13:30:27
Comments or suggestions? Contact us