D
D
Dmitry2015-02-09 00:24:20
linux
Dmitry, 2015-02-09 00:24:20

How, using, for example, rsync, to synchronize two directories, but pulling out ONLY files from the first one?

How, using, for example, rsync, to synchronize two directories, but pulling out ONLY files from the first one? That is, it was:

Каталог 1:
    -файл1
    -файл2
    -Каталог 1-1:
        -файл1-1
        -файл1-2

Became in the new directory:
Каталог2:
    -файл1
    -файл2
    -файл1-1
    -файл1-2

Roughly speaking, transfer files without creating internal directories. Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Samuel_Leonardo, 2015-02-09
@another_dream

find . -type f -exec rsync -a {} --delete ./destination/ \;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question