I have bunch of files on the remote server.
I'm not interested in most of them, except for .pl files.
I want to get a copy of these on my local computer.
What is the best way to do this (at the same try preserving its path)?
I'm thinking somewhere along the lines of:
find . -name "*.pl" | xargs scp localuser@localip
Sadly doesn't do the trick. Anyone have better ideas?
$rsync -av --prune-empty-dirs --include-from=filter user@remotesource/ target/
edit: typo
Maybe this?