Linux ftp command Help and Examples

Linux command FTP stands for File Transfer Protocol. It is used to file transfer to/from a remote network.

Linux and UNIX operating systems have a built-in shell to execute FTP clients to building FTP connections.

FTP command Syntax and Options:

FTP command is straightforward and easy to use.

It has various options to use with FTP protocol and building FTP connections with multiple options.

To know more about FTP command syntax and option click here.

How to use FTP command?

There are multiple ways to use FTP command for file transmission.

Example 1 – How to connect to an FTP site

$ ftp IP/hostname

$ ftp 192.168.5.111
ftp>

Example 2 – A file download using FTP
ftp> get FILENAME

ftp> get index.html my.html
Fetching   /home/linuxconcept/index.html    to     my.html
/home/linuxconcept/index.html    100%     6534      2.3KB/s     00:02
ftp>

Example 3 – Change FTP mode to asci or binary
For ftp ASCII mode:

ftp> ascii
200 Type set to A.
ftp>

For ftp Binary mode:

ftp> binary
200 Type set to I.
ftp>

Example 4 – Uploading a file to FTP server
ftp> put filename

ftp> put index.html

Example 5 – Changing remote directory

ftp> pwd
257/home/linuxconceptis current directory
ftp> cd dir123
250 CWD command successful./home/linuxconcept/dir123is  current  directory.
ftp> pwd
257/home/linuxconcept/dir123is  current  directory.
ftp>

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

16 − 12 =

Related Articles