Forum Moderators: bakedjake

Message Too Old, No Replies

Unix Command Required

empty a file

         

fashezee

6:24 pm on Jun 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I need to empty out files, anyone know the command line?

DamonHD

6:31 pm on Jun 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



cat /dev/null > fileToMakeZeroLength

Rgds

Damon

fashezee

6:53 pm on Jun 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Fantastic!
I've looked all morning for that snippet!
I will consider naming my first born after you!
Thank Tips!

crevier

9:55 pm on Jun 26, 2006 (gmt 0)

10+ Year Member



I know I'm a couple weeks late, but I use this one:


> fileToMakeZeroLength

This saves a few keystrokes, and therefore allows you to go home about 3 seconds earlier.

And if it's in a shell script, then the script is smaller, leaving the disk space for more important purposes; all of which ultimately saves you money, etc. :)