x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

CAT commands, to clear file

evgeneyw Page Icon Posted 2007-03-12 4:19 PM
#
Avatar image of evgeneyw
H/PC Newbie

Posts:
3
Location:
United States
Status:
how do you clear a file using CAT command? i need to preserve the file itself, but empty it... it's a log file, just got too big..
 Top of the page
sophisticatedleaf Page Icon Posted 2007-03-13 7:42 PM
#
Avatar image of sophisticatedleaf
H/PC Elder

Posts:
2,294
Location:
Sunny California
Status:
CAT is for reading, I believe.
$ echo eh > cat.txt 
$ cat cat.txt 
eh
$ echo > cat.txt
$

If you do echo > filename, it is cleared.

Edited by ProgramSynthesiser 2007-03-13 7:43 PM
 Top of the page
Jump to forum:
Seconds to generate: 0.156 - Cached queries : 59 - Executed queries : 9