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

Git get all remote branches

git branch -r \ | grep -v '\->' \ | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" \ | while read remote; do \ git branc...