Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- LogDirs=(
- "/var/log"
- "/usr/lib/log"
- "/Library/Logs/"
- "/System/Volumes/Data/Users/tomas/.dropbox/logs"
- "/System/Volumes/Data/Users/tomas/Library/Containers/com.docker.docker/Data/log"
- "/Users/tomas/Library/Logs/"
- )
- for directory in "${LogDirs[@]}";
- do
- cd $directory
- echo ""; echo "==>" $directory; echo ""
- ls -lah | awk '{print $9, $5}' | column -t | tail -5
- find . -type f -exec truncate -s 0 {} \;
- done
- echo ""; echo "CLEANING FINISHED"; echo ""
Add Comment
Please, Sign In to add comment