Moving files between Folders in Remote directory
Hi,
I'm new to shell scripting. I need to move files between folders in remote directory.I'm connecting to remote server by sftp. I tried using rename command. it works only if i give the full file name.But i need to transfer more files.It'll not be possible to give all file names. Are there any way available to accomplish this. Any help is appreciated. Thanks Saratha. |
You can use scp to copy files between remote hosts, like:
Code:
~$ scp -p -r /path/to/local_directory user@remotehost:/path/to/output |
if this is all remote, why not just use ssh properly?
|
Thank you...But i need to use sftp. Is there an option to assign value to a variable in remote server.
Thanks in Advance |
Hi
I use Code:
sftp -o PORT=port no user@ip add:/route/to/file lls works on local |
Hi
Just reread your post, If you want to move files once you have sftp in, cd to the dir you want to get/put file. On local host lcd to dir where you want file. run command >sftp Code:
get file . Hope that makes sense If you are moving files on remote machine between the dirs on it then ssh would be better |
All times are GMT -5. The time now is 01:43 AM. |