Instructions for using the tftp command

Parameter description: -l is the abbreviation of local, followed by the source file name that exists in the Client, or the file name renamed after downloading the Client.
          -r is the abbreviation of remote, followed by Server, that is, the source file name in the root directory of the tftp server on the PC, or the file name after uploading Server.
          -g is the abbreviation of get, used when downloading files,
          -p is the abbreviation of put, used when uploading files,
          tftp occupies port 69 by default.
    According to the above parameters, the command format of tftp is as follows
1. tftp –g/-p target file name source file name server address
 
 
 -g/-p    target file name    source file name        server address


    illustrate
  -g means download  
  
  -p means upload
       
  It can be the same as or different from the source file name . When
 downloading, add parameter -l
 when uploading, add parameter -r
   Can not be renamed

   when downloading, add parameter -r
   when uploading, add parameter -l

             
 
When downloading files from the Server to the Client, use the following commands:
          tftp –g –l target file name –r source file name server address
For example , the command
          tftp –g –l B.txt –r A.txt 192.168.1.2
 
is used from In the tftp root directory in the server, download the file A.txt to the Client and change its name to B.txt; if it is not renamed, B.txt will be changed to A.txt.
      

When uploading files from Clinet to Server,

Use the following command

 tftp -p -r target file name -l source file name server address
 
For example , the command
 
 tftp -p -r D.txt -l C.txt 192.168.1.2
 
is to upload the file C.txt from the Client to the tftp root target of the Server , and changed its name to D.txt; if not, D.txt will be changed to C.txt.
This command is generally used to change the file name after downloading or uploading. If you do not change the file name, you can use the following simple commands
 
 2, Download or upload
 
without    renaming Download command without renaming:
 
 tftp –g –l/-r source file name server address  
 
(in this case, the parameter -l is equivalent to -r, and only one of them is used); for
 
example, tftp –g –l A .txt 192.168.1.2 or tftp –g –r A.txt 192.168.1.2
 
have the same effect, both indicate that the Client downloads the file A.txt from the Server without changing its name.
 
  tftp -p -l/-r source file name server address   
(the parameter -l is equivalent to -r at this time, only one of them is used);
 
such as tftp -p -l B.txt 192.168.1.2 or tftp -p - r B.txt 192.168.1.2
 
has the same function, which means uploading the file B.txt from the Client to the Server without changing the name.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324136764&siteId=291194637