Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #12566 > unrolled thread

rsync command line - what does the period (.) do?

Started byJon Danniken <jonSPAMdanniken@yaSMPAhoo.com>
First post2014-10-31 21:15 -0700
Last post2014-11-01 08:35 -0700
Articles 5 — 3 participants

Back to article view | Back to comp.os.linux.misc


Contents

  rsync command line - what does the period (.) do? Jon Danniken <jonSPAMdanniken@yaSMPAhoo.com> - 2014-10-31 21:15 -0700
    Re: rsync command line - what does the period (.) do? William Unruh <unruh@invalid.ca> - 2014-11-01 04:29 +0000
      Re: rsync command line - what does the period (.) do? Jon Danniken <jonSPAMdanniken@yaSMPAhoo.com> - 2014-11-01 08:34 -0700
    Re: rsync command line - what does the period (.) do? Marc Haber <mh+usenetspam1118@zugschl.us> - 2014-11-01 09:19 +0100
      Re: rsync command line - what does the period (.) do? Jon Danniken <jonSPAMdanniken@yaSMPAhoo.com> - 2014-11-01 08:35 -0700

#12566 — rsync command line - what does the period (.) do?

FromJon Danniken <jonSPAMdanniken@yaSMPAhoo.com>
Date2014-10-31 21:15 -0700
Subjectrsync command line - what does the period (.) do?
Message-ID<m31mo6$d7a$1@speranza.aioe.org>
I remember once reading in the man page for rsync an explanation as to
the functionality of using a period at the end of a directory, but I
can't seem to find it.

What is the significance of the period (after /boot/) in a command such as:

rsync -av /boot/. /boot-backup/

Thanks!

Jon

[toc] | [next] | [standalone]


#12567

FromWilliam Unruh <unruh@invalid.ca>
Date2014-11-01 04:29 +0000
Message-ID<m31nig$m36$1@dont-email.me>
In reply to#12566
On 2014-11-01, Jon Danniken <jonSPAMdanniken@yaSMPAhoo.com> wrote:
> I remember once reading in the man page for rsync an explanation as to
> the functionality of using a period at the end of a directory, but I
> can't seem to find it.
>
> What is the significance of the period (after /boot/) in a command such as:
>
> rsync -av /boot/. /boot-backup/

I think it cancels out the / just before it:-) rsync operates
differently if you tell it to backup a directlry with a trailing / or
without. If without, it backs up the directory and the contents. If with
a / it backs up just the content. For example lets say a file called 
donaldduck 
is in /boot. With the / you will have a file called 
boot-backup/donaldduck
without the /, you will have a file
boot-backup/boot/donaldduck.  I think the . will do the same as this
latter case, since . is a directory and has not trailing /

>
> Thanks!
>
> Jon

[toc] | [prev] | [next] | [standalone]


#12573

FromJon Danniken <jonSPAMdanniken@yaSMPAhoo.com>
Date2014-11-01 08:34 -0700
Message-ID<m32uig$2u3$2@speranza.aioe.org>
In reply to#12567
On 10/31/2014 09:29 PM, William Unruh wrote:
> On 2014-11-01, Jon Danniken <jonSPAMdanniken@yaSMPAhoo.com> wrote:
>> I remember once reading in the man page for rsync an explanation as to
>> the functionality of using a period at the end of a directory, but I
>> can't seem to find it.
>>
>> What is the significance of the period (after /boot/) in a command such as:
>>
>> rsync -av /boot/. /boot-backup/
> 
> I think it cancels out the / just before it:-) rsync operates
> differently if you tell it to backup a directlry with a trailing / or
> without. If without, it backs up the directory and the contents. If with
> a / it backs up just the content. For example lets say a file called 
> donaldduck 
> is in /boot. With the / you will have a file called 
> boot-backup/donaldduck
> without the /, you will have a file
> boot-backup/boot/donaldduck.  I think the . will do the same as this
> latter case, since . is a directory and has not trailing /

Thanks William, that makes sense.

Jon

[toc] | [prev] | [next] | [standalone]


#12568

FromMarc Haber <mh+usenetspam1118@zugschl.us>
Date2014-11-01 09:19 +0100
Message-ID<m3253f$ekc$1@news1.tnib.de>
In reply to#12566
Jon Danniken <jonSPAMdanniken@yaSMPAhoo.com> wrote:
>I remember once reading in the man page for rsync an explanation as to
>the functionality of using a period at the end of a directory, but I
>can't seem to find it.
>
>What is the significance of the period (after /boot/) in a command such as:
>
>rsync -av /boot/. /boot-backup/

|        It is also possible to limit the amount of path information that
|        is sent as implied directories for each path you specify.   With
|        a  modern  rsync on the sending side (beginning with 2.6.7), you
|        can insert a dot and a slash into the source path, like this:
|             rsync -avR /foo/./bar/baz.c remote:/tmp/
|        That would create /tmp/bar/baz.c on the remote  machine.   (Note
|        that  the dot must be followed by a slash, so "/foo/." would not
|        be abbreviated.)  For older rsync versions, you  would  need  to
|        use a chdir to limit the source path.  For example, when pushing
|        files:
|             (cd /foo; rsync -avR bar/baz.c remote:/tmp/)

Does this help?

Greetings
Marc
-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber         |   " Questions are the         | Mailadresse im Header
Mannheim, Germany  |     Beginning of Wisdom "     | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834

[toc] | [prev] | [next] | [standalone]


#12574

FromJon Danniken <jonSPAMdanniken@yaSMPAhoo.com>
Date2014-11-01 08:35 -0700
Message-ID<m32uj6$2u3$3@speranza.aioe.org>
In reply to#12568
On 11/01/2014 01:19 AM, Marc Haber wrote:
> Jon Danniken <jonSPAMdanniken@yaSMPAhoo.com> wrote:
>> I remember once reading in the man page for rsync an explanation as to
>> the functionality of using a period at the end of a directory, but I
>> can't seem to find it.
>>
>> What is the significance of the period (after /boot/) in a command such as:
>>
>> rsync -av /boot/. /boot-backup/
> 
> |        It is also possible to limit the amount of path information that
> |        is sent as implied directories for each path you specify.   With
> |        a  modern  rsync on the sending side (beginning with 2.6.7), you
> |        can insert a dot and a slash into the source path, like this:
> |             rsync -avR /foo/./bar/baz.c remote:/tmp/
> |        That would create /tmp/bar/baz.c on the remote  machine.   (Note
> |        that  the dot must be followed by a slash, so "/foo/." would not
> |        be abbreviated.)  For older rsync versions, you  would  need  to
> |        use a chdir to limit the source path.  For example, when pushing
> |        files:
> |             (cd /foo; rsync -avR bar/baz.c remote:/tmp/)
> 
> Does this help?

Indeed it does, thanks Marc.

Jon

[toc] | [prev] | [standalone]


Back to top | Article view | comp.os.linux.misc


csiph-web