Linux truncate file
>output-file
-- shortest possible version.
This solution is more efficient than cat, because it doesn't create a subprocess (in addition to the shell process):
true >output-file
You may do easy :)
:>output-file
>output-file
-- shortest possible version.
This solution is more efficient than cat, because it doesn't create a subprocess (in addition to the shell process):
true >output-file
You may do easy :)
:>output-file