truncate

From wikieduonline
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

Alternative: echo "" > filename


Related commands

See also

Advertising: