Skip to content

Instantly share code, notes, and snippets.

@simlun
Last active January 3, 2016 16:29
Show Gist options
  • Select an option

  • Save simlun/8489781 to your computer and use it in GitHub Desktop.

Select an option

Save simlun/8489781 to your computer and use it in GitHub Desktop.

Revisions

  1. simlun revised this gist Jan 18, 2014. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions dropbox-reconciliation.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,10 @@
    #!/bin/bash -ex

    #
    # Example usage:
    # $ ./dropbox-reconciliation.sh 192.168.0.17
    #

    REMOTE_HOST=$1

    EXCLUDES="-name '*.DS_Store' -or -path './.dropbox.cache*' -or -name 'Icon*' -or -name .dropbox"
  2. simlun created this gist Jan 18, 2014.
    11 changes: 11 additions & 0 deletions dropbox-reconciliation.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    #!/bin/bash -ex

    REMOTE_HOST=$1

    EXCLUDES="-name '*.DS_Store' -or -path './.dropbox.cache*' -or -name 'Icon*' -or -name .dropbox"
    EXEC="-type f -exec md5 -r \"{}\" \;"
    FIND="find . \! \( $EXCLUDES \) $EXEC"

    diff <(cd ~/Dropbox; bash -c "$FIND") \
    <(ssh $REMOTE_HOST "cd ~/Dropbox; bash -c \"$FIND\"") \
    | less