this one is pretty useful.
in order to clear the contents of “file.ext”, just:

$>file.ext

You’re actually just putting a null content on the file, but it’s a very effective way to quickly clear a file contents on unix, especially if you want to keep permissions, etc.

Very useful for clearing error logs.

[del.icio.us] [Digg] [Facebook] [Twitter]

One Response

  1. Rome Says:

    thxalot ;-)

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.