Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Network Services»FTP»How to Download and Upload Files using FTP Command Line

    How to Download and Upload Files using FTP Command Line

    By RahulMay 8, 20203 Mins Read

    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.

    Advertisement

    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

    FTP get mget mput put SFTP vsftpd
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Setting Up SFTP User in Ubuntu 22.04

    How to Create SFTP User in Ubuntu 22.04 (No Shell Access)

    (Resolved) userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms

    10 Best Linux FTP Clients in 2023

    View 26 Comments

    26 Comments

    1. Alixa on April 2, 2022 6:37 pm

      TNX.
      i want to upload to ftp server using put command for remote link or http
      ftp>put http://example.com/file.zip
      is it possible?

      Reply
    2. Mac Mafti on April 21, 2021 10:55 am

      Great Help , well done .

      Reply
    3. Amirreza Nadi on January 8, 2021 7:12 pm

      Hello
      I’m Amirreza
      I did what is said is written on this website but I got this:
      200 PORT Command successful.
      150 Opening ASCII mode data connection for file.txt (5 Bytes).
      And nothing else happens.
      Would you please help me?

      Reply
    4. Dan on November 13, 2020 2:53 pm

      Kumar,

      What was the solution to your I/O error

      Dan

      Reply
    5. jaya on June 5, 2019 12:36 pm

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

      Reply
    6. Rashmi Padhy on March 28, 2019 11:09 am

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

      Reply
    7. Sven on June 12, 2018 6:26 pm

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

      Reply
    8. Vaibhav on September 2, 2017 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.

      Reply
    9. Anand on August 5, 2017 4:16 pm

      Awesome tutorial … keep It up

      Reply
    10. Seema.T on May 1, 2017 8:53 am

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

      Reply
    11. Kishor Jangir on April 30, 2017 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 ???

      Reply
    12. angelie stolle on September 4, 2016 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 ?

      Reply
      • Fonda Sandor on September 7, 2016 4:12 am

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

        Reply
    13. Kumar on July 29, 2016 7:19 am

      Hi Rahul, Where can i find the downloaded file. A message is showing as below:

      ftp> get testfile.txt
      200 Port command successful
      150 Opening data channel for file download from server of “/uploads/testfile.txt
      > R:I/O Error
      226 Successfully transferred “/uploads/testfile.txt”
      ftp: 16 bytes received in 0.00Seconds 16000.00Kbytes/sec.

      Reply
    14. Labib Hasan on May 5, 2016 4:42 pm

      Nice article. But i actually use an android phone. How can i do it from my phone?

      Reply
    15. shagul on May 4, 2016 9:06 am

      guys can anyone help me???? how we can download a file from internet using puppet script?

      Reply
    16. Vinil on February 8, 2016 11:30 am

      Nice article . Can you please help me in one requirement :

      Upload file to Unix,from windows.My script is in unix.How can i proceed further ?

      Reply
    17. Lisandro on January 8, 2016 7:26 pm

      If you’re on linux you must type the remote file name to be able to upload it.

      Reply
    18. Rajesh chouhan on December 11, 2015 6:09 am

      try….!!!

      Reply
    19. J on August 23, 2015 8:58 am

      Thank you¡

      Reply
    20. s.maheshkumar on July 20, 2015 5:14 am

      Thanks for ur article.But I have a doubt in http://FTP.I am working as SAP admin in a private company.I need to upload files through http://FTP.They give IP address but while am trying to upload its asking password.How to get the password?Please reply as soon as possible.

      Reply
      • Rahul on August 1, 2015 7:53 am

        Hi
        Ask to person for password, who provides ftp server details.

        Reply
        • Arjun on April 10, 2018 11:22 am

          Hey Rahul

          How to download a particular file from ftp. When ever I try to download, I had to download all the directories present in it.

          Reply
          • Rahul K. on April 10, 2018 5:26 pm

            You can use below command to download a backup.zip file

            get backup.zip

            Reply
    21. John Smith on February 3, 2015 2:02 pm

      Thanks for helpful article….

      Reply
    22. vaibhav on January 5, 2015 12:41 pm

      hello rahul , i appreciate your work.thanxs a lot.
      i was workin with ftp command and i am not able to get through it.
      everytime i connect to techadmin.net it says..connection time out.
      also what about the login and password ??
      please clarify how can i use the ftp command for downloading movies or exe files from other websites.

      Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Implementing a Linux Server Security Audit: Best Practices and Tools
    • cp Command in Linux (Copy Files Like a Pro)
    • 15 Practical Examples of dd Command in Linux
    • dd Command in Linux (Syntax, Options and Use Cases)
    • Iptables: Common Firewall Rules and Commands
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.