How To Transfer File Using FTP cli in Linux Server?

How To Transfer File Using FTP cli in Linux Server?

May 29, 2020 / Nirav Shah

What is File Transfer Protocol?

  • FTP according to Wikipedia
    • “The File Transfer Protocol (FTP) is a standard network protocol used for the transfer of computer files between a client and server on a computer network.”
    • Don’t worry, if you didn’t get what this means. To understand the real thing you just need to know some points about how the servers work.
  • Little basics to understand server-client relation
    • There are always two sides on the Internet, first one is the client(i.e. your browser or system’s program who is sending request) and the second one is the server (i.e. the server which is handling the request sent by the client and responding), that’s why we call it client-server connection.
    • The browser is not the only thing that sends requests to the server, there are so many other programs and codes that can send the request to the same server but all the request entities have to follow some specific protocols.
    • Inside a server, many programs run, so to send the request to a specific program on a server, we should also know the port number of the program on which it is running on the server.
  • Best GUI Application for FTP Connection
    • TFilezila
      • One of the best free FTP Client
  • Command line commands CLI
  • Per Requirements
    • TFTP Client
  • Steps are as follow to upload a file in the server
  • To install FTP in the server
$ yum install ftp
  • To connect to ftp client
$ ftp remote-ip or remote-hostname

step-1

step-2

step-3

step-4

  • Change to the target directory.
$ ftp> cd target-directory

step-5

  • Ensure that you have write permission to the target directory.
$ ftp> ls -l target-directory

step-6

  • Set the transfer type to binary.
$ ftp> binary

step-7

  • To copy a single file, use the put command.
$ ftp> put filename

step-8

step-9

  • To copy multiple files at once, use the mput command.
$ ftp> mput filename [filename ...]

step-10

step-11

  • To close the ftp connection, type bye.
$ ftp> bye

step-12

  • To close the ftp connection, type bye.
  • To install FTP in the server
$ yum install ftp
  • To connect to ftp client
$ ftp remote-ip or remote-hostname

step-1

step-2

step-3

step-4

  • Change to the target directory.
$ ftp> cd target-directory

step-5

  • Ensure that you have write permission to the target directory.
$ ftp> ls -l target-directory

step-6

  • Set the transfer type to binary.
$ ftp> binary

step-7

  • To copy a single file, use the put command.
$ ftp> get filename

step-8

step-9

  • To copy multiple files at once, use the mput command.
$ ftp> mget filename [filename ...]

step-10

step-11

  • To close the ftp connection, type bye.
$ ftp> bye

step-12

Talk to AWS Certified Consultant

    Spread Love By Sharing:

    Let Us Talk About Your AWS Development Requirements

    Have queries about your AWS project ideas and concepts? Please drop in your project details to discuss with our AWS experts, professionals and consultants.

    • Swift Hiring and Onboarding
    • Experienced and Trained AWS Team
    • Quality Consulting and Programming
    Let’s Connect and Discuss Your Project