I'm using Linux server and want to transfer some directories into another server which has Solaris as OS. when I'm connection to server using sftp and transferring it is showing error:
sftp> lpwd
Local working directory: /home/test
sftp> ls
test
sftp> put -r test/
Invalid flag -rI want to transfer directory and sub-directories all using sftp. How to do that?
2 Answers
There's no -r flag in OpenSSH sftp put command.
An upload in this client is always recursive.
So use just:
put test/Or
put test/ /target/directory/ To put the files recursively you need to have the directory test created. So use
mkdir testand then
put test/of you can use scp which have such flag