mirror of
https://github.com/Erreur32/cheat.git
synced 2024-12-22 21:52:12 +01:00
Committed a cheatsheet for 'truncate'
This commit is contained in:
parent
483a1da08b
commit
b2159662f3
1 changed files with 10 additions and 0 deletions
10
cheatsheets/truncate
Normal file
10
cheatsheets/truncate
Normal file
|
@ -0,0 +1,10 @@
|
|||
To clear the contents from a file:
|
||||
truncate -s 0 file.txt
|
||||
|
||||
To truncate a file to 100 bytes:
|
||||
truncate -s 100 file.txt
|
||||
|
||||
To truncate a file to 100 KB:
|
||||
truncate -s 100K file.txt
|
||||
|
||||
(M, G, T, P, E, Z, and Y may be used in place of "K" as required.)
|
Loading…
Reference in a new issue