All commands
truncate
Topic: Files and folders
Program: truncate
Sets the size of a file.
Package: core-inodes
Usage
truncate OPTION... FILE...
Description
Set the size of each FILE. A missing FILE is created empty unless -c is given.
Growing adds a hole that takes no space and reads as zero bytes; shrinking cuts off the end.
Options in the simulator
-
-s, --size=SIZE new size in bytes, units K, M, G; +N and -N grow and shrink by N -
-c, --no-create leave missing files alone -
--help show this help and exit
3 more options of the real program, not in the simulator yet
-
-o, --io-blocks not in the simulator yet On a real system the size then counts in blocks of the file system instead of bytes.
-
-r, --reference needs a value not in the simulator yet On a real system truncate takes the size of another file.
-
--version not in the simulator yet On a real system it prints the version of the program.
Where you learn it
No lesson yet.
All commands