How do you empty the contents of a File in Linux ?
cat /dev/null > your_file
The cat command first reads the contents of /dev/null - there's nothing in it. It then writes this into your_file.
A handy way to clear bulky application log files in Linux.
Tuesday, October 9, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment