Created
August 2, 2012 17:12
-
-
Save ttscoff/3238816 to your computer and use it in GitHub Desktop.
Bash alias to recursively delete Dropbox conflicted files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias rmdbc="find . -name *\ \(*conflicted* -exec rm {} \;" # recursively delete Dropbox conflicted files | |
# and/or (smart idea from Gordon Fontenot) | |
alias rmdbcsafe="find . -name *\ \(*conflicted* -exec mv {} ~/DropboxConflicts/ \;" # recursively move Dropbox conflicted files to temp folder | |
# or... via TJ Luoma | |
alias rmdbctrash="find . -name *\ \(*conflicted* -exec mv -v {} ~/.Trash/ \;" # recursively move Dropbox conflicted files to Trash | |
# More advanced idea combining ideas from @modernscientist and @GFontenot would be | |
# Hazel or launchd script to move conflicted files to temp folder once a day, and Hazel or launchd script to delete files older than [x] | |
# Or schedule TJ's idea of moving to Trash and skipping intermediate folder while still maintaining the ability to review | |
# hmmmm... |
Nothing short of brilliant. Wouldn't expect anything less from @tjluoma.
If you want to see something really overdone, here's a shell script that I run when I need to compare conflicted copies against one another:
https://github.com/tjluoma/dropdups
(It's a zsh shell script, so I don't claim it is pretty, but it does work, at least for me :-)
Well done. Smart use of horrendous ( characters in filenames!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I do something similar, but I look for a more specific filename, and move to the Trash folder
find . -name \*\'s\ conflicted\ copy\ \* -exec mv -v {} ~/.Trash/ \;