Difference between revisions of "Truncate"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Tags: Mobile web edit, Mobile edit
Line 23: Line 23:
  
 
== See also ==
 
== See also ==
* {{cat}}
+
* {{coreutils}}
 
* {{files}}
 
* {{files}}
  

Revision as of 05:52, 16 March 2023

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: