I have a folderA remotely which has 2 subfolders folderB and folderC.I have to search for my
file where it is located in the 2 subfolders(folderB and folderC) and should copy it.
Is it possible with rsync and a script like thing.
I have a folderA remotely which has 2 subfolders folderB and folderC.I have to search for my
file where it is located in the 2 subfolders(folderB and folderC) and should copy it.
Is it possible with rsync and a script like thing.
You could always use find over ssh:
scp user@hostname:`ssh user@hostname "find folderA -name \"targetFile\" "` .
This opens up two SSH connections, so you'll be prompted for the password twice unless you've set up unprotected key-files.
Sure, using rsync just exclude everything, then only include the name of the file you want:
$ rsync --exclude="*" --include="filename" -e ssh user@remote:path/to/folderA/ .