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.

I am required to use PuTTY to submit a program but I have never used it before and am having a hard time changing my directory. I am successfully connected to a Linux computer from my own but can't seem to change the directory to where I need it to be. The file I wish to transfer is located here:

C:\Users\xxx\workspace\Life

I therefore assumed this would work:

cd \C:\Users\xxx\workspace\Life

However I get the "No such file or directory" response. What am I doing wrong?

share|improve this question

migrated from stackoverflow.com Sep 7 '11 at 0:31

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

    
That would change the directory on the remote server rather than your local machine. As you have SSH access to the server, try using WinSCP to transfer the file to the remote linux server. (I assume you are on Windows) –  bruce182 Sep 6 '11 at 17:19
    
When you have PuTTY, you might just as well use pscp, which is included. –  bart Sep 6 '11 at 20:16
add comment

3 Answers 3

PuTTY is a telnet client. It isn't used for file transfer. I assume you're using the PSFTP, the ftp client that is part of the PuTTY suite.

If that's the case, then to change local directories, use lcd instead of cd. The cd command is for changing directories on the linux computer you are connected to.

EDIT:

The easiest way to transfer files is with FTP. As it turns out, you don't need PuTTY or any other FTP client; Windows has built-in FTP support through Windows Explorer. Just type ftp://accountname@linuxcomputer.myschool.edu into the address bar (substituting the correct info, of course). Explorer should ask for a password and after you enter it, you should see the target computer just as if it were another drive on your PC. Just copy and paste the file as if you were making a copy on your hard drive. (There is a bug in some versions of Windows Explorer where, after you make a connection, it shows a blank directory. You can fix this by putting the focus back in the address bar and hitting the enter key without changing the address.)

share|improve this answer
    
Sorry I believe I worded my question poorly, I believe what I meant to ask was how to copy a file from windows to the linux computer I am connected to? –  Justin Sep 6 '11 at 17:34
    
I've edited my answer to include instructions for copying from Windows to a linux computer. –  Ted Hopp Sep 6 '11 at 21:52
add comment

PuTTY itself isn't a file transfer program. It gives you access to the remote computer, but you won't see any of your files there.

However, PuTTY includes two file transfer programs called PSCP and PSFTP. You probably need to use those. Basic usage, from a command prompt on your Windows PC:

pscp myfile username@hostname:~/
share|improve this answer
    
Sorry I believe I worded my question poorly, I believe what I meant to ask was how to copy a file from windows to the linux computer I am connected to? –  Justin Sep 6 '11 at 17:34
    
Like he said. It's a command line for in Windows to transfer a local file over to Linux. –  bart Sep 6 '11 at 20:17
add comment

Your Answer

 
discard

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