[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: empty directories need disk space



> on different servers I have cache folders with a lot of small files. Now
> all the files are delete but the folder "need" 151 MB.
> Whats gonig on here? What is the problem? How can I fix? Delete and
> create would be impracticable.
> 
> --- /home/somedir/cache/baseall/basecache
> ---------------------------------------------------
>   151.0MiB [##########]
> /locks                                                                              

I have no idea what this syntax means. You should try do just "ls -ld" the
directory (assuming that is what you mean by "folder").

But for what it's worth, directories need room to store the names of the
files they contain. Stated like that, that is completely obvious. A lot of
filesystems will not shrink directories where files have deleted. The space
will only be freed when the directory itself is unlinked.

How to fix the issue depends on your use profile. But are you sure it is an
issue? The disk space is used by the directory, but the filesystem knows
that it is free for storing file names in this directory. It is not lost. If
at some point you had a lot of files, you may have a lot of files in the
future too.

Regards,

-- 
  Nicolas George


Reply to: