I tend to use:

   : > filename

Since ":" is no-op.

On 03/13/15 10:54, Yves Dorfsman wrote:
For the past 25 years or so, I've always used:

     cat /dev/null >/path/to/filename

to empty a file. Somebody just showed me:

     >/path/to/filename

Is this "new"? I've never seen it before (and I've worked with quite a few
sysadmins and devs)... Is this bash vs other shells? I feel weird not knowing
this.

--
Mr. Flibble
King of the Potato People
http://www.linkedin.com/in/RobertLanning
_______________________________________________
Tech mailing list
Tech@lists.lopsa.org
https://lists.lopsa.org/cgi-bin/mailman/listinfo/tech
This list provided by the League of Professional System Administrators
http://lopsa.org/

Reply via email to