Welcome to Blog's Mr T
Pages
Home
Saturday, May 30, 2009
How to empty a file without deleting and recreating it?
Was working with log files and wanted a quick way to empty them and recreate them. rm and touch would do it, but found something simpler:
cat /dev/null > filename
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment