Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

strange directory size

Status
Not open for further replies.
Sep 28, 2002
20
0
0
IN
My server is : sunOS Release : 5.8.
I am facing strange problem. When I am doing ls -l command it shows me following output :
drwxrwxr-x 2 ipwsh01 asg 3584 May 17 2003 WOOSH
drwxrwxrwx 2 ipasg01 asg 30720 Mar 18 2003 acpsdata
This shows me that directory acpsdata having some data. But when I goto in that directory and pass ls -al command it shows me following output :
total 62
drwxrwxrwx 2 ipasg01 asg 30720 Mar 18 2003 .
drwxr-xr-x 31 root root 512 Jun 20 04:35 ..
Where are files containg some data? I am not aware about history of this directory.
Note that My current userid is : ipasg01

Can anybody assit me in this problem ?

 
This just means that the directory HAS contained data to this extent in the past, but it doesn't at the moment. Unfortunately, the directory size doesn't automatically shrink back. If it really is empty, you could possibly delete it then remake it with the same perms/ownership etc. That should reset the size. Be sure you wish to do this though - there's usually no overhead associated with this kind of thing. HTH.
 
the size of a directory does not show the amount of data contained within this directory, it's the size of the inodetable of this directory. This size is always growing, it never shrinks even if you delete the contents; if you do not like this size you need to delete the directory itself and recreate it from scratch (mkdir)

Best Regards, Franz
--
Solaris System Manager from Munich, Germany
I used to work for Sun Microsystems Support (EMEA) for 5 years
 
Hi sachinss1978,

Just to add a bit more info to the above posts. You can view all the filenames that have ever been in the directory with the following command:

strings -n 1 /path/to/acpsdata

Thus you can see why the size of the directory is 30720 bytes. (It contains lots of filenames of files).

I hope that helps.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top