Results 1 to 2 of 2
Hi all, I use rhythmbox to do download my podcasts and I'd really like to automatically sync the new files to my phone when I attach it. The phone mounts ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-08-2011 #1
- Join Date
- Mar 2011
Help with specific rysnc bash script
I use rhythmbox to do download my podcasts and I'd really like to automatically sync the new files to my phone when I attach it.
The phone mounts as an external drive so I was kind of hoping to write a script that would run automatically when the drive mounts.
Here is a rough idea of what I think it would be doing...
if *mp3 in /home/user/music/foo
rsync /home/user/music/foo * /media/phone
I would want it to delete files on the phone that are not present on the computer.
Can anyone help me with the syntax for both the bash part and the correct rsync command?
Many thanks in advance.
- 03-08-2011 #2
The rsync command is
rsync -avr --delete /home/music/foo/ /media/phone
You need the slash after foo or it will put them in /media/phone/foo, creating the foo folder if it doesn't exist.