FTP stands for File Transfer Protocol.

FTP is one of the most useful command for a system administrator, all administrator almost every day using FTP command to transfer files to FTP server.

Suggested Reading: FTP command structure

Learn FTP command structure and syntax to use FTP frequently for moving backup data or some critical file which needs to move in some safe location.

Here I am going to mention 15 methods to use the FTP command in system admin day-to-day life.

Suggested Reading: FTP command help and Examples

FTP Command Examples:

 Now, let’s discuss on 15 practical uses of ftp command:

Example 1 – Connect FTP server with IP

Connect to ftp server using ftp command as shown below.

$ ftp 192.168.10.1

We can use above command to connect with FTP server “192.168.10.1”.

Example 2 – Connect FTP server with Hostname

Connect to ftp server using hostname of ftp server as shown below.

$ ftp linuxconcept.com

We can use above command to connect with ftp server “linuxconcept.com”.

Example 3 – Upload files into FTP server

To upload files on ftp server, use put command as shown below.

ftp> put linuxconcept.com

The above command will upload the file “linuxconcept.com” on ftp server.

Example 4 – Download files from FTP server

To download files from ftp server, use get command as shown below.

ftp> get linuxconcept.txt

The above command use to download “linuxconcept.txt” file from ftp server.

Example 5 – Upload multiple files into FTP server

To upload multiple files into ftp server use “mput” command as show below.

ftp> mput *.txt

The above command will upload all file into ftp server which has “txt” extension in current local directory.

Example 6 – Download multiple files from FTP server

To download multiple files from ftp server, use “mget” command as show below.

ftp> mget *.txt

The above command use to download all files from current remote directory which has “txt” extension.

Example 7 – Delete file from FTP server

To delete file from ftp server, use “delete” command as show below.

ftp> delete linuxconcept.txt

The above command is use to delete linuxconcept.txt file from ftp server.

Example 8 – Delete multiple files from FTP server

To delete multiple files from ftp server in single command, use “mdelete” as shown below.

ftp> mdelete *.txt

The above command use to delete all files from ftp server which has “txt” extension.

Example 9 – Use help in ftp terminal

To get help in ftp command, use “help” or “?” as show below.

ftp> help
ftp> ?

If you want detailed help on specific ftp command use below syntax of ftp command.

ftp> help <COMMAND>

Example 10 – Changing FTP mode to binary

To change ftp mode to binary, use “binary” command as shown below.

ftp> binary

Example 11 – Changing FTP mode to Ascii

To change ftp mode to asci, use “asci” command as shown below.

ftp> ascii

Example 12 – Changing remote directory in FTP

To change remote server’s directory in ftp server, use “cd” command as shown below.

ftp> pwd
257  “/linuxconcept” is current directory.
ftp> cd testdir
250  CWD  command successful. “/linuxconcept/testdir” is current directory.
ftp> pwd
257  “/linuxconcept/testdir” is current directory.

The above command use to change directory “testdir” on remote server.

Example 13 – Changing local directory in FTP

To change local system directory on ftp prompt, use “lcd” command as shown below.

ftp> lcd /tmp

The above command use to change “/tmp” local directory.

Example 14 – Listing content of the remote directory in FTP

To list all files and content for FTP server’s remote directory, use “ls” or “dir” command as shown below.

ftp> ls
ftp> dir

Example 15 – Close FTP connection

To close the FTP connection from the server, use “quit” or “close” command.

When using the “quit” command, FTP connection will terminate, and you will be on your system back, as shown below.

ftp> quit
$

When you want to close FTP connection from FTP server without coming out from FTP prompt, use “close” command as shown below.

ftp> close
221 Goodbye.
ftp> 

If You Like What We Do Here On LinuxConcept, You Should Consider:

Stay Connected to: Twitter | Facebook

Subscribe to our email updates: Sign Up Now

 

We are thankful for your support.

Follow me