Find the answer to your Linux question:
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.
  1. #1
    Just Joined!
    Join Date
    Mar 2011
    Posts
    1

    Help with specific rysnc bash script


    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 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.
    D

  2. #2
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    664
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •