Linux FTP Commands with examples

Linux FTP Commands with examples

FTP:

FTP or the file transfer program utility which is mainly utilized to share or transfer the files in a local machine and in the remote networking machine while using the file transfer program. If we explain it simply it mainly copies and transfers the files, which are mainly done between the two PC. It is very simple to use and also very easy to learn. In the case of the Linux servers, there are enormous numbers of commands, options which are available in the file transfer protocol.

FTP is a great way to simply download and upload files with the help of the remote servers while using the file transfer protocol of the FTP commands. Active and Passive are actually two types of FTP connection server. By the default Port 20 and the Port 21 is the main two parts which are associated with the FTP transfer methods. Port 21 is mainly used to connect and establish a secure connection and the other port 20 is the data default transfer port. Below are some of the important examples of the file transfer protocol command in a brief detail.

How to easily connect to a server via the FTP?

Syntax:

# ftp domain . com

# ftp IP - Address - of - server


Examples:

Root @ server {~} # ftp hoststud.com

Connected to hoststud.com (1.2.3.4)

220 - - - - - - - - - - - - Welcome to pure - FTPd [privsep] [ TLS ]

220 - You are the user number 2 of 50 Allowed

How to list the files under the current folder:

Syntax:


ftp > Is

Examples:

ftp > Is

227 entering the passive moder ( 198, 15, 127, 170, 49, 187 )

150 Accepted the Data Connection

Change Directory:

Syntax:

ftp> cd dirNames

How to change the local directory:

Syntax:

ftp> Icd dirNames

Download or copy the local directories:

Syntax:

ftp > get filename

Downlaod and copy more than the one file from the server:


Syntax:

ftp > mget file1 file2
Author
Jaishree
First release
Last update
Rating
0.00 star(s) 0 ratings
Top