truncate (coreutils package)
truncate
coreutils
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:
truncate -s 500MB /swap.img
virt-resize
touch
split
rm
echo
logrotate
fallocate
tr
tail
dirname
env
sleep
install, truncate
mkdir
ls
ln
stat
blockdev
fuser
lsof
scrub
chattr
cp
mv
file (command)
mkfifo
chmod
Advertising: