Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #set -x
- # FOR USE THIS SCRIPT:
- # 1. chmod +x script.sh
- # 2. ./script.sh /path/to/directory/with/project
- # Show only tar-archives on the directory
- for delTar in $(ls -1tr `find $1 -type f -exec file {} + | grep 'POSIX tar archive (GNU)' | awk '{print $1}' | sed 's/://'` | head -n -5):
- do
- echo "Archive $delTar is deleted"
- rm -f $delTar
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement