Operating System - HP-UX
1825777 Members
2170 Online
109687 Solutions
New Discussion

Re: Inquiry on directory size

 
Pando
Regular Advisor

Inquiry on directory size

Dear Gurus,

I would like to ask on directory sizes.

When I created a Directory (directory1), its initial size was i think around 96 bytes. When i moved some data into it grows also. However, when i transfer the content of the directory1 to directory2. directory1 is empty and the size is still the same when it had the contents though i already move the contents to directory2.Below is the screenshot of my screen.

total 332
drwxrwxr-x 2 idsdb users 52224 Oct 11 07:33 integ
drwxrwxr-x 2 idsdb users 36864 Oct 11 07:33 mepro
drwxrwxr-x 2 idsdb users 51200 Oct 11 07:34 nf
drwxrwxr-x 2 idsdb users 24576 Oct 11 07:34 oneminute
drwxrwxr-x 2 idsdb users 1024 Oct 7 13:43 optical
drwxrwxr-x 2 idsdb users 4096 Oct 11 07:35 quadpro

All of the directory have 0 (zero) files in it.
How is that?

4 REPLIES 4
RAC_1
Honored Contributor

Re: Inquiry on directory size

The directory is just like a file. It differs from a file in a way that it stores inode information for files under it.
When you move files, the inode entry is marked as available but not freed or deleted.

What you see is normal in unix.
There is no substitute to HARDWORK
Mel Burslan
Honored Contributor

Re: Inquiry on directory size

to reduce the file size to initial 96 or whatever it was, just rmdir and mkdir the same directory name if you are concerned about the size but this should not be cause for any concern if you ask me.
________________________________
UNIX because I majored in cryptology...
Pando
Regular Advisor

Re: Inquiry on directory size

Okey. Thanks for the replies.
Pando
Regular Advisor

Re: Inquiry on directory size

Thanks