1

So, I just downloaded a several folders using rsync, it went something like this:

rsync -rzP user@domain:/mnt/file_direction /mnt/Downloads/Files

This worked well for a massive download, however, now I need to just download certain files with a strucutre similar to these:

folder_a/folder_1/func/some_file.gz
folder_a/folder_2/func/some_file.gz
folder_b/folder_1/func/some_file.gz
folder_b/folder_2/func/some_file.gz

As you can see, these are files within concatenated folders. All files I need to download have the same format, so there should be no issues there.So, the gist of it is that I need to download just the "some_file.gz" while maintaining folder structure recursive.

Any and all help is much appreciated!

1
  • try this: rsync -rzP --include="some_file.gz" --include="/" --exclude="*" user@domain:/mnt/file_direction /mnt/Downloads/Files Commented Oct 19, 2021 at 15:05

1 Answer 1

1

Try this:

rsync -rzP --include="*some_file.gz" --include="*/" --exclude="*" user@domain:/mnt/file_direction /mnt/Downloads/Files

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.