rsync-cp

14 views
Skip to first unread message

highs...@yahoo.de

unread,
Feb 24, 2021, 10:09:28 AM2/24/21
to Jeremiah Bess
same problem:

hello
I tried sth:



rsync -r checkold/*.txt checknew

Before I put some files to
checkold.

It did work.
cp -r checkold/*.txt checknew

Then I created

in a subdirectory
checkold/try/1.txt
checkold/try/2.txt
and so on.

I did again:
rrync -r checkold/*.txt checknew
and only the files from checkold
did walk to checknew.
But
the files in the subdir
checkold/try/
were not copied.

What do I do wrong?

Regards

Sophie



rsync -a   had the same problem.



highs...@yahoo.de

unread,
Mar 6, 2021, 11:09:25 AM3/6/21
to Jeremiah Bess
Thank You again.
I did print it out and I study it.

Regards
Sophie



Am 24.02.21 um 16:38 schrieb Jeremiah Bess:
> Note this command will copy all subdirectories and their contents. If you
> are just wanting to collect all .txt files from multiple subdirectories and
> put them in one directory, you'd be better off with my find command I
> posted earlier.
>
> Jeremiah Bess
>
>
> On Wed, Feb 24, 2021 at 8:22 AM Jeremiah Bess <jeremi...@gmail.com>
> wrote:
>
>> You can't use this format: checkold/*.txt. It will only work for .txt
>> files directly under checkold, not any of the subdirectories.
>>
>> Just like the find command I posted last time, rsync has an option to
>> filter files. Try this:
>>
>> rsync -r --include=*.txt checkold checknew
>>
>> Jeremiah Bess
Reply all
Reply to author
Forward
0 new messages