When I want to sync my music directory to my SDcard I use the command rsync -a --delete /home/garrett/Music /media/garrett/6BF6-AC8A
and everything works just fine. I got tired of typing all that in every time so I placed that command in the script ~/bin/music-sync and this is what the file looks like below
#!/bin/bash
rsync -a --delete /home/garrett/Music /media/garrett/6BF6-AC8A
#END#
But everytime I run this command from the script it placed two copies of every songs on my SDcard, this problem only plauges the script version, it works fine from the CLI. I the script I also tried placing $()
around the command but that version also placed two copies of every song on my SDcard. Any ideas? Thanks.
While we're on the subject of rsync and my music library, would there be a way make that rsync line have a list of exceptions for files not to sync from the source and to get that list of exceptions from a file instead of all written out on the CLI itself? Thanks again.