Skip to content

Instantly share code, notes, and snippets.

@ttscoff
Created August 2, 2012 17:12
Show Gist options
  • Save ttscoff/3238816 to your computer and use it in GitHub Desktop.
Save ttscoff/3238816 to your computer and use it in GitHub Desktop.
Bash alias to recursively delete Dropbox conflicted files
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...
@omarlakkis
Copy link

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