LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Linux directories do not shrink automatically (https://www.linuxquestions.org/questions/linux-general-1/linux-directories-do-not-shrink-automatically-677239/)

sulekha 10-17-2008 10:02 PM

Linux directories do not shrink automatically
 
Hi all,

this is what i have read in a book

Because Linux directories do not shrink automatically, removing a file
from a directory does not shrink the directory, even though it frees
up space on the disk.remove unused space and make a directory smaller,
you must copy or move all the files to a new directory and remove the
original directory.

how valid is this claim ?

AsusDave 10-17-2008 10:13 PM

I think this depends on the file system in use. Some file systems cannot be shrunk and others can. Search wikipedia for "file systems" for an exhaustive listing :-)

Thanks
Dave

estabroo 10-17-2008 11:20 PM

That's just in relation to the inodes the directory is using which is going to be an insignificant portion of your total disk space and since directories by default take up about 4K you can put quite a few files into a directory before you even see a size change on the directory. For the majority of the users out there this is a non-issue.


All times are GMT -5. The time now is 03:44 AM.