directory Syncing

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Jasonjkenner@mindspring.com
Date:  
Subject: directory Syncing
Bill Warner wrote:
>
> Sorry if this is like the 5th time this gets posted
> but I am not seeing my mail go through to the list even
> after 3-4 hours. It might be my end but I have been
> able to send a few test messages to other lists and my
> self.
>
> Anyway,
>
> what is the best way to get rsync capabilities between
> two local directories. such as /foo and /bar need to be
> synced. I have looked at rsync and rdist but both seem
> to be for syncing across two or more hosts and not for
> just two directories. Searching on freshmeat turned up
> pretty much nothing, but I am not sure exactly what I should
> be looking for.


#!/bin/bash
#
CURRENTDIR=`pwd`
cd $2
TARGETDIR=`pwd`
cd $CURRENTDIR
cd $1
shift
shift
# allow passing of arguements to the extracting tar, such as keep
existing files, etc
tar -cvf - * | tar $@ -xvC $TARGETDIR -f -



-- 
    __
I Support Linux:           _> _  _ |_  _  _     _|
Working Together To       <__(_||_)| )| `(_|(_)(_|
To Build A Better Future.       |                   <s>