Advertisement
chuuupa

bash for mo

Aug 17th, 2023 (edited)
931
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.23 KB | None | 1 0
  1. if [ "$#" -ne 1 ]; then
  2.   echo "$0 <path to dir>"
  3.   exit 1
  4. fi
  5.  
  6. if [ -z "$1" ]; then
  7.   echo "dir $1 not exists"
  8.   exit 1
  9. fi
  10.  
  11. find "$1" -maxdepth 1 -type f -name "*.bak" -o -name "*.tmp" -o -name "*.backup" -exec rm -fv {} +
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement