• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How to Download and Upload Files using FTP Command Line

Written by Rahul, Updated on October 7, 2019
FTP ftp, get, mget, mput, put, sftp, vsftpd

FTP (File Transfer Protocol) is the most popular protocol to transfer files (download and upload) from one system to another system. It provides the fastest way to transfer files. There is much application available on Linux and windows to FTP services like vsFTPd, proFTPd for Linux, FileZilla Server for windows.

There are various ways to connect to the FTP server, Also you can find multiple free tools on the internet to work with FTP. But system admins know the power of command line. This article will help you to how to connect to the FTP server using the command line and Download and Upload Files using FTP protocol between the FTP server local system.

Remember that FTP is not a secure protocol. We recommend using SFTP for transferring files security. Visit below links to how to use SFTP.

  • How to Download and Upload Files with SFTP Securely

1. Connect to FTP Server via Command Line

To connect to any FTP server from windows open its command prompt and for Linux open terminal window. Now you have required IP or Hostname of FTP server and login credentials to connect with a specific user.

c:\> ftp ftp.tecadmin.net

Download and Upload Files using FTP

2. Upload Single File to FTP Server

To upload file on FTP server use put command from FTP prompt. First, navigate to the desired directory on the FTP server where to upload a file and use the following command. It will upload local system file c:\files\file1.txt to uploads directory on FTP server.

ftp> cd uploads
ftp> put c:\files\file1.txt

Download and Upload Files using FTP

3. Download A Single File from FTP

To download the file from FTP server, we use get command. Using that command we can download one time at a time. To download any file from FTP server First login to your FTP server, navigate to the directory and use the following command to download

ftp> get file1.txt

Download and Upload Files using FTP

4. Upload Multiple Files to FTP

To upload multiple files to FTP server use mput command. You can also specify wildcard characters to upload multiple files to the server at a time. First, navigate to the desired directory on the FTP server where to upload a file and use the following command. It will upload local system files with .txt extension in c:files directory to uploads directory on FTP server.

ftp> cd uploads
ftp> lcd c:\\files

ftp> put *.txt

Download and Upload Files using FTP

5. Download Multiple Files from FTP

To download multiple files from FTP server, we use mget command. Using that command we can download more than one file at a time. To download multiple files specify wildcard character for specifying directory name do download all files from the directory.

ftp> mget *.txt

Download and Upload Files using FTP

Share it!
Share on Facebook
Share on Twitter
Share on Reddit
Share on Tumblr
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

Related Posts

  • How to Use SFTP for Secure File Transfer on Linux

    March 2, 2019
  • How to Create SFTP Only User on CentOS/RedHat 7

    January 15, 2019
  • How to Create SFTP User without Shell Access on Ubuntu 18.04 & 16.04

    January 10, 2019
  • How to Download and Upload Files with SFTP Securely

    March 8, 2017
  • How to Recursively Download Files from FTP

    April 14, 2016

22 Comments

  1. Avatar jaya Reply to jaya
    June 5, 2019 at 12:36 pm

    write a command as lftp sftp://username:[email protected] -e “get filename”

  2. Avatar Rashmi Padhy Reply to Rashmi
    March 28, 2019 at 11:09 am

    Hi ,
    I want to know the code for how to download a file from server to local using sftp protocol

  3. Avatar Sven Reply to Sven
    June 12, 2018 at 6:26 pm

    The desire to gamble is evenly allocated amongst competitions, gender or
    tradition.

  4. Avatar Vaibhav Reply to Vaibhav
    September 2, 2017 at 6:59 pm

    Hi the article is useful i am able to put files on the server but getting > R:I/O Error on getting it .Please Revert if you have any information regarding the same.

  5. Avatar Anand Reply to Anand
    August 5, 2017 at 4:16 pm

    Awesome tutorial … keep It up

  6. Avatar Seema.T Reply to Seema.T
    May 1, 2017 at 8:53 am

    @KUMAR
    File is saved at last specified directory from an lcd (local change dir) command within the ftp session.

  7. Avatar Kishor Jangir Reply to Kishor
    April 30, 2017 at 6:43 am

    I am able to connect with it but when I am uploding the file using put command that time I am getting this error 500 “port/eprt is not supported”
    I am able to upload file using ftp client file zilla.
    Can you guide me what’s wrong here ???

  8. Avatar angelie stolle Reply to angelie
    September 4, 2016 at 2:03 am

    Nice article , I am thankful for the information . Does anyone know where I might get ahold of a template TAR-2003 example to type on ?

    • Avatar Fonda Sandor Reply to Fonda
      September 7, 2016 at 4:12 am

      my business partner got a blank TAR-2003 here http://goo.gl/CtLaJB

« Previous 1 2

Leave a Reply

Cancel reply

Popular Posts

  • How to Install Python 3.8 on Ubuntu, Debian and LinuxMint
  • How to Restart Network Service on CentOS 8 or RHEL 8
  • How to Check IP Address on CentOS 8
  • How to Install Java 11/8 on Amazon Linux
  • How to Configure Static IP on CentOS 8 (CLI)
Copyright © 2013-2019 TecAdmin.net. All Rights Reserved. This site uses cookies. By using this website you agree with our term and services
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkNo
Revoke cookies