Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- dirs=`find '/cygdrive/'*'/$RECYCLE.BIN/' -maxdepth 1 -type d -name 'S-*'`
- for dir in ${dirs}
- do
- cd "$dir"
- files=`'ls' '$I'* 2>/dev/null`
- for file in ${files}
- do
- sfile=${file:2}
- res=`'ls' '$R'$sfile 2>/dev/null|wc -l`
- if [[ "$res" -eq 0 ]]
- then
- 'rm' "${file}"
- fi
- done
- cd
- done
- # verify results (before & after) with `find /cygdrive/*/*recycle*/`
Advertisement
Add Comment
Please, Sign In to add comment