Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Sep 2006 17:04:39 -0500
From:      Dan Nelson <>
To:        Paul Schmehl <>
Subject:   Re: Sync files locally?
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
In the last episode (Sep 27), Paul Schmehl said:
> What's the best way to sync files locally?
> I'm running rsync over ssh to backup files from a server.  Now I'm
> setting up a new server, so I rsynced to it as well.  The files end
> up in a subdir of my home directory, because my account is being used
> for the rsync.  I've been using cp -R to put them in the right place
> on the server and the chmod and chown to get the perms right, but I'm
> thinking there has to be a way to sync the files locally so that only
> the ones that have changed or are new have to be copied to the right
> place.

As long as your rsync path has a leading /, it should start at the root
filesystem.  e.g. "rsync mydir otherserver:mydir" creates ~/mydir ,
"rsync mydir otherserver:/mydir" creates /mydir (assuming you have
> I can use find to set the perms, but I'm not sure how to sync the
> files.  This is unix, so there's got to be a built-in utility that
> does this, but I can't seem to find it.

You could use rsync to do this, but It'd probably be easier to get your
remote rsync to drop the files in the right directory in the first place.
	Dan Nelson

Want to link to this message? Use this URL: <>