How to rsync just the current folder?

Posted by Michael on Server Fault See other posts from Server Fault or by Michael
Published on 2014-08-20T19:12:07Z Indexed on 2014/08/22 10:21 UTC
Read the original article Hit count: 130

Filed under:

I want to sync some files from a remote server to my local computer. How can I make rsync to just copy the files with a certain file extension in the directory but no subdirectories?

I assumed this to be an easy task, but embarassingly I'm not getting it for nearly 2 hours. So could someone give me an example?

I did various experiments with something like the following command:

rsync -a --include=what? --exclude=what? -e ssh [email protected]:/test /test

© Server Fault or respective owner

Related posts about rsync