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

Re: Flush file contents



On Wed, Jan 07, 2004 at 01:55:29PM -0500, Rick Pasotto wrote:
> On Wed, Jan 07, 2004 at 12:42:33PM -0600, Rick Weinbender wrote:
> > Is there a command to flush or empty the contents
> > of a file?
> > I would like the empty file to retain it's attributes and rights.
> 
> cat /dev/null > file
> 
Hi,
also,

: > file

HeHeHe,
-Kev

Ps.
it is also a safe thing to do to log files. If you delete a logfile,
data will be lost. But by cp'ing and then null'ing a file you dont risk that.

Attachment: signature.asc
Description: Digital signature


Reply to: