• ¡Welcome to Square Theme!
  • This news are in header template.
  • Please ignore this message.
Hello There, Guest! Login RegisterLogin with Facebook


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FTP using Command Line - Upload and Download Files.
#1
FTP is nothing but the "File Transfer Protocol" that we all know. This is used to upload and download files from source to destination. There are multiple  ways to connect to FTP server i.e. using FTP client, web browser and command line. 

Today, we are going to discuss FTP using command line but do remember FTP is not a secure protocol so most of the system administrators uses SFTP (Secure File Transfer Protocol). 

1) How to login to FTP server via command line for Windows and Linux? 

You can use "Command Prompt" on Windows system to connect to FTP server and "Terminal" for Linux system. All you need to specify is the server IP address or a hostname of the FTP server with FTP username and password. 

For ex :- 


Code:
C:\> ftp ftp.24x7servermanagement.net

C:\> ftp 108.178.38.194


2) put command - to upload file on FTP server. 

We've to use "put" command to upload file to FTP server from your system. 

Let's assume, we want to upload a file from Windows Computer to Linux Server.


Code:
C:\>ftp ftp.24x7servermanagement.net

ftp> cd images

ftp> put c:image.jpg


3) get command - to download file from FTP server. 

We've to use "get" command to download file from FTP server to your system. 

Let's assume, we want to download a file from Linux Server to Windows Computer.


Code:
C:\>ftp ftp.24x7servermanagement.net

ftp> cd images

ftp> get image.jpg

4) lcd command - to change local directory while doing FTP. 

We have various drives present on our Windows computer like C, D, E drive etc. We often need to upload a file from different locations to do so, we need to first change the local drive while doing FTP. 


Code:
C:\>ftp ftp.24x7servermanagement.net

ftp> lcd D:\testing\images
Local directory now D:\testing\images



5) mput command - to upload multipe files to FTP server. 

We've to use "mput command to upload multiple files to FTP server from your system. 

Let's assume, we want to upload multiple TXT files from Windows Computer to Linux Server.


Code:
C:\>ftp ftp.24x7servermanagement.net

ftp> lcd D:\testing\images

ftp> put *.jpg


Here, * (Wild Character) is used to upload multiple files. 

6) mget command - to download multiple files from FTP server. 

We've to use "mget command to download multiple files from FTP server to your system. 


Code:
ftp> mget *.jpg

Do let us know your thoughts in our comments section below.
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)