If you want to empty a file’s content in a Unix based system then simply use > like so:
[source]
$ > /var/log/foo.txt
[/source]
This sends the output of nothing to the file which will make it nothing.
If you want to empty a file’s content in a Unix based system then simply use > like so:
[source]
$ > /var/log/foo.txt
[/source]
This sends the output of nothing to the file which will make it nothing.