-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 At some point hitherto, mike ledoux hath spake thusly: > On Mon, Jun 10, 2002 at 03:33:56PM -0400, Robert La Ferla wrote: > > problem. I am running a huge multi-threaded process that I redirected > > to a file in /tmp. I did delete the file by mistake. Could that be the > > cause of this? > > If the file is still open, which it sounds like it is, deleting it > won't free up the space until after the file is closed. Unfortunately, > the only way I can think of to close the file in this case would be to > terminate the process. I concur with mike... It's almost certainly your log file that's causing the problem, and the only way to make it stop is to kill the process. That is, barring some of the fancy I/O redirection techniques using GDB discussed last week... On Unix systems, once a file is opened by a process, the file will not be removed from the filesystem until all processes which have it open do a close() on the file (or exit, which does a close()). A process which is writing to the file does not care that you've removed the directory entry; once the file is open it does not need it to be there to continue writing to the file. There are many advantages to doing this, but it does tend to cause a problem with exactly what you're experiencing. On at least most (and I believe all) Unix systems, there is a way to deal with a log file filling up your filesystem, though it requires that you not care about losing the logs... Of course, if you've filled up your FS, you're already losing data, so it hardly matters. If you have a log file which is constantly having data appended to it, and you need to free up the space it occupies but need the process to keep running, you can truncate the file in place (to zero bytes) using this command: $ echo -e "\c" > filename where filename is the name of your file. This empties out the file, and successive writes will continue to write to the same file, but all previous data will be lost. - -- Derek Martin ddm@pizzashack.org - --------------------------------------------- I prefer mail encrypted with PGP/GPG! GnuPG Key ID: 0x81CFE75D Retrieve my public key at http://pgp.mit.edu Learn more about it at http://www.gnupg.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9BQSkdjdlQoHP510RAt49AJ4y8/aKFnezOCUtuPtPZ9ialAM+mQCgpdW2 UPhOo/c+xYrZ4vKztuvVd9I= =Lf6S -----END PGP SIGNATURE-----