Tuesday, February 26, 2013

To examine the ftp transfer type and to change the transfer type:



ftp> status   -  To view the current transfer type.
ftp> ascii     -  To change to ascii transfer type.
ftp> binary   -  To change to binary transfer type.

Binary mode refers to transferring files as a binary stream of data. Where ASCII mode may use special control characters to format data, binary mode transmits the raw bytes of the file being transferred. In this way, the file is transferred in its exact original form.

When files are transferred in ASCII mode, the transferred data is considered to contain only ASCII formatted text. Whereas in Binary mode, the transferred data can contain the data in formats such as .txt, .zip, .gzip, .tar files.


Output:
ftp> status
Connected to localhost.
No proxy connection.
Not authenticated.
Mechanism: kerberos_v5
Autoauth: off; Autologin: on
Control Channel Protection Level: clear
Data Channel Protection Level: clear
Passive mode: off.
Mode: stream; Type: binary; Form: non-print; Structure: file
Verbose: on; Bell: off; Prompting: on; Globbing: on
Store unique: off; Receive unique: off
Case: off; CR stripping: on
Ntrans: off
Nmap: off
Hash mark printing: off; Use of PORT cmds: on


ftp> ascii
200 Type set to A.
ftp> status
Connected to localhost.
No proxy connection.
Not authenticated.
Mechanism: kerberos_v5
Autoauth: off; Autologin: on
Control Channel Protection Level: clear
Data Channel Protection Level: clear
Passive mode: off.
Mode: stream; Type: ascii; Form: non-print; Structure: file
Verbose: on; Bell: off; Prompting: on; Globbing: on
Store unique: off; Receive unique: off
Case: off; CR stripping: on
Ntrans: off
Nmap: off
Hash mark printing: off; Use of PORT cmds: on

 
Note:

ftp> hash  - To view the progress of the file transfer.