Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 1 of 1
  1. #1
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,352

    Rsync helper script

    If you're like me, your aging neurons can't hold all the myriad rsync options that make it such a powerful utility. In fact, I find rsync's syntax so counter intuitive that I usually have to spend a half-hour consulting the man page every time I use it.

    In an attempt to make rsync more usable for myself, I've written a shell script front-end that uses Windows robocopy.exe like syntax and then translates that into rsync syntax.

    Example, using this script, the simple command:
    Code:
    # robocopy -s /mnt/Media/Music /mnt/MediaNew/Music '*.flac'
    ..i.e. copy all the flac files from one directory tree to another..gets translated into and then executed as the following rsync command:
    Code:
     rsync --links --perms --times --group --owner --devices --specials --stats --progress --verbose --prune-empty-dirs --recursive --include='*/' --include='*.flac' --exclude='*' '/mnt/Media/Music/' '/mnt/MediaNew/Music'
    This script is a work in progress. Please let me know in this thread if you find it useful, if you've found bugs --AND-- if you have any code corrections / additions.

    Enjoy.

    20120405 update:

    Fixed --maxage=, --minage= selection.

    Ok, finally figured out how to attach a file with the new forum tools.
    Attached Files Attached Files
    Last edited by gharris999; 2012-04-13 at 10:42.

Posting Permissions

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