Difference between revisions of "Truncate"

From wikieduonline
Jump to navigation Jump to search
Line 2: Line 2:
  
  
* Set file to zero: <code>truncate -s 0 /path/to/filename</code>
+
* Set file to zero:  
 +
** <code>truncate -s 0 /path/to/filename</code>
 +
** <code>truncate -s 0 /var/lib/docker/containers/*/*-json.log</code>
  
truncate -s 500MB [[/swap.img]]
+
* <code>truncate -s 500MB [[/swap.img]]</code>
  
  

Revision as of 08:23, 9 February 2023

truncate (coreutils package)


  • Set file to zero:
    • truncate -s 0 /path/to/filename
    • truncate -s 0 /var/lib/docker/containers/*/*-json.log


Related commands

See also

Advertising: