Hi All,
Many a times when we work on the console of UNIX based systems - we will have very little access to Windows or X terminal.
This post explains how to truncate a file. Truncate a file as in deleting all the lines of the file.
This is done usually when we want to clear the logs.
This below command does our job:
cat /dev/null > filename.extension
Note that its a single '>' and not '>>'
Take care,
Ananth S Gouri
Showing posts with label truncate a log file. Show all posts
Showing posts with label truncate a log file. Show all posts
Tuesday, July 6, 2010
Subscribe to:
Posts (Atom)
