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
- Steps are as follow to upload a file in the server
- To install FTP in the server
$ yum install ftp
$ ftp remote-ip or remote-hostname




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

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

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

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


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


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

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




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

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

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

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


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


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