source file is located in (elk.some.com)
/export/elk2/vp141p/Somedir/dist/current/Filename.ear
destination machine(191.hydc.xxx.com)
/export/home/vp141p/ARCHIVE
scp -p vp141p@hstst191.hydc.sbc.com:/export/elk2/vp141p/PM_Build_SBS/Build_PVT_SBS/dist/current/Filename.ear .
The above code is doing is copying to home directory of remote machinf
But i need to copy it to specific directory
i need to copy it to /export/home/vp141p/ARCHIVE
scp -p vp141p@hstst191.hydc.sbc.com:/export/elk2/vp141p/PM_Build_SBS/Build_PVT_SBS/dist/current/Filename.ear /export/home/vp141p/ARCHIVE
it gives error
No such file or directory
But a directory is already there and all the permissions are there
Perhaps it can't find the originating file, then.
The source file is there as iam able to copy successfully using the above command i posted
panyam
June 24, 2011, 11:43am
4
scp syntax is :
scp local_file.txt your_username@remotehost.edu:/some/remote/directory
So, in that case
scp -p /export/elk2/vp141p/Somedir/dist/current/Filename.ear
vp141p@hstst191.hydc.sbc.com:/export/home/vp141p/ARCHIVE
should work.
[/CODE]
Well, that's not the correct syntax for "cp".
It seems you're using the same "username@hostname:/path" syntax with "scp" as well as with "cp".
If that was just a typo in your post, then either the source or destination locations might not exist at all.
i used the same syntax . it was giving the error
no file or directory found