on Wed, Jan 03, 2001 at 09:36:38PM -0500, D-Man ([EMAIL PROTECTED]) wrote: > On Wed, Jan 03, 2001 at 06:05:13PM -0800, kmself@ix.netcom.com wrote: > <snip> > > > > $ fuser -v bigfile # show process(es) using bigfile > > $ fuser -vk bigfile # kill process(es) using bigfile > > $ fuser -v bigfile # verify the kill worked > > $ cat /dev/null > bigfile # "empty" the file > > $ rm bigfile > > > > In general, you want to *empty* a file (cat /dev/null > file) before you > > delete it, and you don't want to delete an open file. > > > > Why would you cat /dev/null into the file before removing it?
- In the event something filled (or was still filling) the file. - In the event I didn't get the kills right. I've now got an empty(er) disk to try to set things right in, and don't have a large, but unreachable, quantity of data to deal with. - In the event the file was larger than 2 GB (under some circumstances this leads to problems, IIRC). - To speed up the rm -- don't as me why, but I've observed this in the past. -- Karsten M. Self <kmself@ix.netcom.com> http://kmself.home.netcom.com/ Evangelist, Zelerate, Inc. http://www.zelerate.org What part of "Gestalt" don't you understand? There is no K5 cabal http://gestalt-system.sourceforge.net/ http://www.kuro5hin.org
pgpyOteqHCWop.pgp
Description: PGP signature