Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How would I copy somefile.zip to another directory?

share|improve this question

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

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

3 Answers 3

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.

share|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. –  G-Wiz Oct 21 '09 at 20:15

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/

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.