Quick shell tip:
If you want to truncate a file to zero bytes from the command-line, here's an easy way.
user@host [~]$ > filename
I used to use:
user@host [~]$ cp /dev/null filename
But the first approach is less typing.
Friday, April 11, 2008
Subscribe to:
Post Comments (Atom)
2 comments:
Dude
I was searching for this quite desperately. Thanks for this.
Thanks a lot for this tip. Very helpful.
Post a Comment