Skip to content

Instantly share code, notes, and snippets.

@ChrisCummins
Created February 1, 2017 11:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChrisCummins/9f5d84c167abc114482767dfe1b197d4 to your computer and use it in GitHub Desktop.
Save ChrisCummins/9f5d84c167abc114482767dfe1b197d4 to your computer and use it in GitHub Desktop.
Find and optionally remove conflicted Dropbox files.
#!/usr/bin/env bash
#
# Find and optionally remove conflicted Dropbox files.
# Feb 2017 Chris Cummins <chrisc.101@gmail.com>
#
# Usage:
# ./find-dropbox-conflicts.sh # list conflicted files
# ./find-dropbox-conflicts.sh --rm # remove conflicted files
#
if [[ "$1" == "--rm" ]]; then
find ~/Dropbox -name '*conflicted copy*' -exec rm -v {} \;
else
find ~/Dropbox -name '*conflicted copy*'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment