Joined May 2012
·

Roberto Alsina

Canonical
·
Argentina
·
·
·

Posted to linux : empty file from command line over 1 year ago

"echo > foo" doesn't create an empty file, it creates a file of size 1

"> foo" does work correctly.

A traditional alternative is the bash builtin ":" which does nothing:

:> foo

Achievements
69 Karma
0 Total ProTip Views