Results 1 to 2 of 2
Hello,
I would like to synchronize several files (from separate folders) and different folders to one single directory. It seems too tedious to specify each file and directory in a ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-15-2008 #1Just Joined!
- Join Date
- Apr 2008
- Posts
- 3
Need help with rsync on local machine
Hello,
I would like to synchronize several files (from separate folders) and different folders to one single directory. It seems too tedious to specify each file and directory in a single rsync command, so I was wondering if anyone has a script, where I can simply list the paths to each file and directory I want to sync. And I'm doing this all on a local machine, so I don't need to worry about ssh.
Thanks,
Lain
- 07-15-2008 #2Just Joined!
- Join Date
- Sep 2007
- Location
- Lafayette, IN
- Posts
- 83
Are you looking for something like this?
If I understand what you're wanting, that should do the trick. Of course, you can give rsync different options to tweak how it behaves (see `man rsync`)Code:#!/bin/csh -f # Target directory set target='/home/myself/target' # Source directories set sources='/home/myself/source1 /home/myself/source2 /usr/local/etc/monkeys' foreach s ( $sources ) rsync -av $s $target end


Reply With Quote
