Skip to content

111 Recipes

How to delete (empty) the content of a file in Linux

truncate -s 0 filename

What this command does: Truncates filename to a size of zero.

Documentation: manpages.debian.org/unstable/coreutils/truncate.1.en