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


Groups > linux.debian.user > #181146

Re: how to copy files

From Felix Dietrich <felix.dietrich@sperrhaken.name>
Newsgroups linux.debian.user
Subject Re: how to copy files
Date 2017-05-20 15:50 +0200
Message-ID <tJcVA-28c-15@gated-at.bofh.it> (permalink)
References <tH8Mp-6zv-13@gated-at.bofh.it> <tHbhf-8tb-5@gated-at.bofh.it> <tHeIa-2lr-7@gated-at.bofh.it> <tHisq-4X0-9@gated-at.bofh.it>
Organization solani.org

Show all headers | View raw


Dejan Jocic <jodejka@gmail.com> writes:

> rsync -av /path/to/original/folder /path/to/backup
>
> Notice that there is no need for those / on the end of paths.

Rsync actually treats a trailing newline on the source path specially;
quoted from the man page:

    A  trailing  slash on the source changes this behavior to avoid
    creating an additional directory level at the destination.  You
    can think of a trailing / on a source as meaning "copy the con‐
    tents of this directory" as opposed to "copy the  directory  by
    name" […]

--
Felix Dietrich

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

how to copy files Long Wind <longwind2009@gmail.com> - 2017-05-14 23:00 +0200
  Re: how to copy files Lisi Reisz <lisi.reisz@gmail.com> - 2017-05-14 23:50 +0200
  Re: how to copy files Dan Ritter <dsr@randomstring.org> - 2017-05-15 01:40 +0200
    Re: how to copy files Long Wind <longwind2009@gmail.com> - 2017-05-15 05:20 +0200
      Re: how to copy files Dejan Jocic <jodejka@gmail.com> - 2017-05-15 09:20 +0200
        Re: how to copy files Felix Dietrich <felix.dietrich@sperrhaken.name> - 2017-05-20 15:50 +0200
          Re: how to copy files Dejan Jocic <jodejka@gmail.com> - 2017-05-20 16:20 +0200
  Re: how to copy files Greg Wooledge <wooledg@eeg.ccf.org> - 2017-05-15 14:50 +0200

csiph-web