You are viewing this site in a simplified layout because your browser does not yet support CSS Subgrid.

op111.net

Search op111.net

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