Re: Delete a file THAT big? Surely you are joking.

[prev] [thread] [next] [lurker] [Date index for 2006/12/18]

From: =?iso-8859-1?b?U+liYXN0aWVu?= Aperghis-Tramoni
Subject: Re: Delete a file THAT big? Surely you are joking.
Date: 16:34 on 18 Dec 2006
Yossi Kreinin wrote:

> Sébastien Aperghis-Tramoni wrote:
> >>
> >>Want to clean up your disk? Look for small files, the ones you can remove.
> >
> > But did you trunc the file before removing it?
>
> I removed it using rm. I don't know what you mean.

That on Unix, a file is not actually remooved as long as there is an opened
filehandle poiinting to it. So if you remove a log while the program writing
it is still running, you can't free space. You must restart the program so
the pending filehandle is closed and the file removed (and the space freed).
Another solution is to truncate the file (see trunc(3)):

    $ >file

--
Sébastien Aperghis-Tramoni

Close the world, txEn eht nepO.
There's stuff above here

Generated at 03:01 on 20 Dec 2006 by mariachi 0.52