Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #239896
| From | l0f4r0@tuta.io |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: copy directory tree, mapping to new owners |
| Date | 2021-09-12 09:00 +0200 |
| Message-ID | <CWrD4-56O-7@gated-at.bofh.it> (permalink) |
| References | <CWlQZ-11P-1@gated-at.bofh.it> <CWm0F-15d-3@gated-at.bofh.it> <CWmN3-1EN-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi,
12 sept. 2021, 03:45 de richard@walnut.gen.nz:
> On 12/09/21 12:52 pm, Greg Wooledge wrote:
>
>> cd /src
>> mkdir -p /dest
>> rsync -a . /dest/ # The trailing / matters.
>> cd /dest
>> find . -user mysite -exec chown mysite_test {} +
>> find . -user mysite-run -exec chown mysite-run_test {} +
>>
>
> [...]
> # actually not necessary? rsync will create it
> mkdir -p mysite_test/doc_root
>
You can make a simple test to know that but I would say that rsync doesn't create your destination "root" directory (the one you specify on the command line) unless `--mkpath` is used.
> # The trailing / matters. Does it matter on the source as well?
> # I generally include it.
> rsync -a mysite/doc_root/ mysite_test/doc_root/ # The trailing / matters.
>
Actually, I'm not sure to understand Greg's remark here.
In my opinion, trailing slash doesn't matter for destination folder on the contrary of *source* folder.
In other words, for me, the following are equal:
rsync -a mysite/doc_root/ mysite_test/doc_root/
rsync -a mysite/doc_root/ mysite_test/doc_root
But not the following:
rsync -a mysite/doc_root mysite_test/doc_root => you will get an extra "doc_root" folder (the source one) in your dest, i.e. : mysite_test/doc_root/doc_root and then the content of doc_root source
rsync -a mysite/doc_root/ mysite_test/doc_root => your doc_root (destination) folder will get doc_root content (source) directly
Best regards,
l0f4r0
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
copy directory tree, mapping to new owners Richard Hector <richard@walnut.gen.nz> - 2021-09-12 02:50 +0200
Re: copy directory tree, mapping to new owners Greg Wooledge <greg@wooledge.org> - 2021-09-12 03:00 +0200
Re: copy directory tree, mapping to new owners Richard Hector <richard@walnut.gen.nz> - 2021-09-12 03:50 +0200
Re: copy directory tree, mapping to new owners john doe <johndoe65534@mail.com> - 2021-09-12 09:00 +0200
Re: copy directory tree, mapping to new owners Andrei POPESCU <andreimpopescu@gmail.com> - 2021-09-12 12:30 +0200
Re: copy directory tree, mapping to new owners Richard Hector <richard@walnut.gen.nz> - 2021-09-13 01:50 +0200
Re: copy directory tree, mapping to new owners <tomas@tuxteam.de> - 2021-09-13 09:10 +0200
Re: copy directory tree, mapping to new owners Richard Hector <richard@walnut.gen.nz> - 2021-09-14 08:20 +0200
Re: copy directory tree, mapping to new owners <tomas@tuxteam.de> - 2021-09-14 09:00 +0200
Re: copy directory tree, mapping to new owners David Wright <deblis@lionunicorn.co.uk> - 2021-09-14 15:50 +0200
Re: copy directory tree, mapping to new owners Richard Hector <richard@walnut.gen.nz> - 2021-09-15 01:00 +0200
Re: copy directory tree, mapping to new owners l0f4r0@tuta.io - 2021-09-12 09:00 +0200
Re: copy directory tree, mapping to new owners Curt <curty@free.fr> - 2021-09-12 16:30 +0200
Re: copy directory tree, mapping to new owners l0f4r0@tuta.io - 2021-09-12 18:40 +0200
Re: copy directory tree, mapping to new owners Richard Hector <richard@walnut.gen.nz> - 2021-09-13 01:50 +0200
Re: copy directory tree, mapping to new owners l0f4r0@tuta.io - 2021-09-12 09:20 +0200
Re: copy directory tree, mapping to new owners Teemu Likonen <tlikonen@iki.fi> - 2021-09-12 09:50 +0200
Re: copy directory tree, mapping to new owners <tomas@tuxteam.de> - 2021-09-12 10:10 +0200
Re: copy directory tree, mapping to new owners Richard Hector <richard@walnut.gen.nz> - 2021-09-13 02:10 +0200
csiph-web