Tuesday, August 25, 2015

Truncate logs

truncate logfile --size 0
For the entire file system:
find / -type f -name "*.log" -exec truncate --size 0 {} +

No comments:

Post a Comment

What's the quickest way to find duplicated files?

find . ! -empty -type f -exec md5sum {} + | sort | uniq -w32 -dD fdupes -r / linux_czkawka_gui.AppImage