Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

i have this file myfirst.txt located on a cluster of computers down the hall, i.e.:

myname@login1:~> ls
myfirst.txt

which i want to download to the home directory:

scp [email protected]:myfirst.txt .

to which i get:

myfirst.txt                                   100% 1828     1.8KB/s   00:00

now where (on my home computer) is this myfirst.txt file ? i can't find it. It's not visible when i click 'show hidden files' either.

Tia,

share|improve this question

2 Answers 2

up vote 3 down vote accepted

It's in the current directory. To check you should be able to just do:

ls

Make a note of the directory and it's contents. If the file isn't there, then it's not copied. Make sure you don't have more arguments in that command.

If you have a desktop, this sort of thing can be done via the desktop gui too. You simply mount the ssh server as an sftp from Places > Connect to Server

share|improve this answer
    
thanks for the GUI hint. –  user2413 Feb 2 '11 at 11:39
scp [email protected]:myfirst.txt .

Here you are running scp with two arguments. The first is the source, a remote file: [email protected]:myfirst.txt. The last argument is the destination. In your case: .. . is the current directory, so the file will end up in your current directory.

If you want it to go somewhere else, then specify another directory, e.g.

scp [email protected]:myfirst.txt /tmp

This will copy it to /tmp

You can also specify a new name for it. E.g.

scp [email protected]:myfirst.txt /tmp/info.txt
share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.