Video:How to Do an Internet File Transfer in Linuxwith Zoya Popova
File transfers are a necessary skill and are easy to do using Linux. This About.com video will show you how to do internet file transfers in Linux.See Transcript
Transcript:How to Do an Internet File Transfer in Linux
Hi, I'm Zoya Popova for About.com, and today I'm going to show you how to do an internet file transfer in Linux.
Using the 'ftp' Command to Transfer Files in Linux
To transfer files to and from a remote server, you will use the 'ftp' command. Once you enter it, every command line in your terminal will start with an 'ftp' prompt.
To open a connection to a server, use the command 'open' followed by the web address of the server or its IP address: open ftp.yumley.com
Once the connection is established, you will see some information about the server. In this particular case, we have a server that is "a private system," which means you need a log-in and a password to be able to transfer files.
Set Up Passive Mode
Once you've entered your username and password, you can try to see what files are located on the server using the 'ls' command. But sometimes, the 'ls' command will not work, returning a message, "Connection refused". This may happen because of your computer's firewall prohibiting connections considered unsafe. To get around this, switch your file transfer protocol to passive mode by entering the command: passive
Now that passive mode is up, the 'ls' command returns a list of the files stored in the server's current directory.
Actually Downloading an Internet File in Linux
Let's say we would like to download one of those files, BalboaParkMap.pdf. The command is very simple: get BalboaParkMap.pdf
The only thing to know about 'ftp' is that it works betweent he current directory of the server and the current directory of your local machine. That's the reason we are using the file name per se, instead of a pathway, in the command line. Also for this reason, the file we have downloaded will end up in the local machine's current directory. In my case, it is my home directory.
Sending Files is Similar
Sending a file from the local machine to the server is very similar. Once again, the file you are sending must be in your current directory. To send the file /home/zoya/text1.odt, enter: send text1.odt
And now, if you run the 'ls' command once again for your FTP server, you will see that this file has been transferred onto the server.
And this is how you do an internet file transfer in Linux. Thank you for watching, and for more information, please visit us at About.com.