Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Mar 2007 12:47:31 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Noah <admin2@enabled.com>
Cc:        User Questions <freebsd-questions@freebsd.org>
Subject:   Re: rsync and trailing '/'
Message-ID:  <45EC1163.3090405@infracaninophile.co.uk>
In-Reply-To: <45EC0C0D.7040302@enabled.com>
References:  <45EC0C0D.7040302@enabled.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig96BDD455DC8E7635753D6ED0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable

Noah wrote:
> rsync  version 2.6.9  protocol version 29
>=20
> I am running rsync, and I wonder if having the trailing '/' at the end
> of the directory is proper configuration?
>=20
> --- snip ---
>=20
> /usr/local/bin/rsync -avz -e ssh globs@globs.com:/var/cron/ /var/cron/
>=20

Presence of absence of the final '/' on the rsync *source* directory
means different things.

If you say:

   rsync -a foo/ bar/

directory bar will end up with a copy of the contents of foo. So a=20
file foo/wibble.txt will end up as bar/wibble.txt. If
on the other hand you say:

   rsync -a foo bar/

then you end up with a directory structure 'bar/foo/...', and wibble.txt
ends up as bar/foo/wibble.txt

Other than that, the presence or absence of the trailing slash on the
*target* directory doesn't make a great deal of difference.  I usually
try and work things so that the rsync command line always has trailing
slashes on both the source and the destination directories simply for
consistencies' sake.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       Flat 3
                                                      7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey         Ramsgate
                                                      Kent, CT11 9PW, UK


--------------enig96BDD455DC8E7635753D6ED0
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.2 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF7BFo3jDkPpsZ+VYRAy0SAKCq7tqNsZvlz/EMTA2GzqrV+F3vvQCfY1O3
vZ44b+oePbyLBvsqTEIdLuU=
=gmWv
-----END PGP SIGNATURE-----

--------------enig96BDD455DC8E7635753D6ED0--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45EC1163.3090405>