How would I copy somefile.zip to another directory?

link|improve this question
feedback

migrated from stackoverflow.com Oct 25 '09 at 23:48

This question came from our site for professional and enthusiast programmers.

3 Answers

If you are connected to a shell session via ssh, and the file exists on the remote system, you can use the cp command.

cp sourcefile destfile

If the file exists on the local system you should use sftp. If your local machine runs Windows, WinSCP is an excellent sftp client.

link|improve this answer
why would you use sftp when you have scp, which goes over SSH so it doesn't require any extra software or ports? – rmeador Oct 21 '09 at 19:46
The original poster didn't say they had scp. Assuming they don't have it, WinSCP is much easier. Furthemore, sftp uses the same port as ssh. – gWiz Oct 21 '09 at 20:15
feedback

Assuming you're using the command line then like this

scp myfile.txt dest/

for a local file or alternatively

scp user@myserver:/path/to/myfile.txt user@myserver:/path/to/dest/

link|improve this answer
feedback

If you are using Win32, Tunnellier is a reasonable solution which not only allows file transfer, but secure remote access as well.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown