Resources‎ > ‎Unix Basics‎ > ‎

Command Line FTP

To initiate an FTP connection from the command line

At unix prompt type "ftp <ftp.site.address>". When possible secure connections can be established by typing "sftp <sftp.site.address>"
$ftp ftp.tgen.org
#This brings up a prompt for the username
Name: username
#This brings up a prompt for the password (if required)
Password: 123
#This brings up the ftp prompt
ftp>

To navigate when in the FTP command environment

Remote site:
cd xyz - to move between diretories
ls - to see a list of files and folders in current directory
pwd - to get current directory path

Local machine:
lcd xyz - to move between directories
lls - to see a list of files and folders in current directory

To move files between machines

NOTE: You must first navigate to correct local and remote directories before initiating transfers

Download from remote site to local machine
get file.txt

Upload from local machine to remote site
put file.txt

To end an FTP session

quit
Comments