truncate

From wikieduonline
Revision as of 05:53, 16 March 2023 by Newworld3 (talk | contribs) (→‎Related commands)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

truncate (coreutils package)


Set file to zero:

  • truncate -s 0 /path/to/filename
  • truncate -s 0 /var/lib/docker/containers/*/*-json.log
  • echo "" > filename

Truncate to a size:


Related commands

See also

Advertising: