Skip to content

Instantly share code, notes, and snippets.

@pedrohills
Forked from samirfor/rsync_all_media_mounted.sh
Created December 19, 2016 13:42
Show Gist options
  • Save pedrohills/789628cd9d07098de4f1b00515af2bb1 to your computer and use it in GitHub Desktop.
Save pedrohills/789628cd9d07098de4f1b00515af2bb1 to your computer and use it in GitHub Desktop.
Rsync incremental + beep when finished
#!/bin/bash
for mount_point in $(find /media/samir/ -mindepth 1 -type d); do
if ! mountpoint -q ${mount_point}/; then
continue
fi
echo ":: ${mount_point}"
rsync --archive --verbose --human-readable --progress \
--delete --delete-excluded --exclude="*Thumbs.db" \
"/home/samir/Downloads/Fortaleza2040/" "$mount_point" &
done
wait # Expects all jobs finished second plan.
( speaker-test -t sine -f 1000 )& pid=$! ; sleep 0.1s ; kill -9 $pid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment