Forum Moderators: bakedjake

Message Too Old, No Replies

Whats the command to copy a file to my local computer

I'm sure it's simple...

         

TheDave

5:18 am on Jan 27, 2004 (gmt 0)

10+ Year Member



A techy friend has set me up with some remote access, running FreeBSD, and I can't contact him, so forgive me for asking such a stupid question, but I really only need to use this one command. I am logged in to my remote computer, and I've found the file I want to copy, and I've got to the directory it's in (thats as far as my unix command knowledge goes ;P), now I want to get that file and save it to my computer, work on it, and then save it back. This one command could save me a Lot of time ;) Thanks :)

vrtlw

9:39 am on Jan 27, 2004 (gmt 0)

10+ Year Member



I think it would be easiest via FTP.

The best thing would be to setup a shareware or freeware (there are plenty to choose from) FTP server on your PC (probably windows or mac machine) and ftp fromm the FreeBSD to there.

Some commands for ftp to enable you to do this (making sure you are already in the directory where the file is) are:

bash-2.05$ ftp -n 123.123.123.123

ftp> user %your_ftp_username%

Password: *******

ftp> put filename.txt

You should then find the file in the home directory you setup in the FTP server, voila copy and paste.

TheDave

10:37 am on Jan 27, 2004 (gmt 0)

10+ Year Member



I gave it a shot, and I understand hows it's meant to work (I think), but it didnt so I might just sit tight until I can contact the expert and ask him to set me up. Thanks anyway, if I get really desperate at least I know the right direction, I was trying to use the cp command and all sorts of crazy stuff ;P

SeanW

12:45 pm on Jan 27, 2004 (gmt 0)

10+ Year Member



Chances are you're using ssh to access the box, right?

Grab winscp [winscp.sourceforge.net...]

You'll be able to transfer files to and from the remote box over a secure channel.

Sean

Shanks

11:45 pm on Jan 27, 2004 (gmt 0)



I found that you can sometime enter "ftp://[url of ftp server]" into the addressbar of your web browser, and you can log in from there and just drag and drop.

TheDave

12:15 am on Jan 28, 2004 (gmt 0)

10+ Year Member



Thanks Sean I'll give that a go.

edit - Perfect! Thanks! :D

vrtlw

2:37 am on Jan 28, 2004 (gmt 0)

10+ Year Member



SeanW,
Thats a nice tool, thanks.

Shanks,
You are right but we were trying to transfer files the other way round, from a FTP session initated on the FreeBSD box to the Windows machine. Assuming the FreeBSD box had an FTP daemon running then the file would have had to be copied first into the %ftproot% directory using the cp command.