Re: Memory leakage
On Wed, Jan 03, 2001 at 06:05:13PM -0800, email@example.com wrote:
> $ 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?