Briefly introduce the most frequently used FTP commands

  

No matter what kind of system you use, in short, the FTP command is the most frequently used command. Those who may not have used this command don't know the power of this command. Sometimes you use this command. There will be a multiplier effect. If you don't believe it, use it.

The FTP command line format is: ftp -v -d -i -n -g [hostname], where

-v displays all response information from the remote server;

-n restricts automatic login of ftp, ie not used;

-i etrc file;

-d uses debug mode;

-g cancels global file name.

The internal commands used by ftp are as follows (the brackets indicate optional):

1.![cmd[args]]: Execute the interactive shell in the local machine, exit returns to the ftp environment, Such as: !ls*.zip.

2.$ macro-ame[args]: Execute the macro definition macro-name.

3.account[password]: Provide the login to the remote system successfully The supplemental password required to access system resources.

4.append local-file[remote-file]: Append the local file to the remote system host. If the remote system file name is not specified, the local file name is used.

5.ascii: Use the ascii type of transmission.

6.bell: The computer rings once after each command is executed.

7.bin: Use binary file transfer.

8.bye: Exit the ftp session process.

9.case: When using mget, convert the uppercase in the remote host file name to lowercase.

10.cd remote-dir: Enter the remote host directory.

11.cdup: Enter the parent directory of the remote host directory.

12.chmod mode file-name: Set the access mode of the remote host file file-name to mode, such as: chmod 777 a.out .

13.close: Interrupt the ftp session with the remote server (corresponding to open).

14.cr: When using ascii to transfer files, convert carriage return to lineback.

15.delete remote-file: Delete remote host files.

16.debug[debug-value]: Set the debug mode to display each command sent to the remote host, such as: deb up 3, if set to 0, cancel the debug.

17.dir[remote-dir][local-file]: Display the remote host directory and save the result to the local file local-file.

18.disconnection: Same as close.

19.form format: Set the file transfer mode to format, the default is file mode.

20.get remote-file[local-file]: Transfer the remote host's file remote-file to the local-file of the local hard disk.

21.glob: Set the file name extension of mdelete, mget, mput. By default, the file name is not extended, and the -g parameter of the command line is used.

22.hash: Each time 1024 bytes are transmitted, a hash symbol (#) is displayed.

23.help[cmd]: Display help information for ftp internal command cmd, such as: help get.

24.idle[seconds]: Set the remote server's sleep timer to [seconds] seconds.

25.image: Set the binary transfer mode (same as binary).

26.lcd[dir]: Switch the local working directory to dir.

27.ls[remote-dir][local-file]: Display the remote directory remote-dir and save it to the local file local-file.

28.macdef macro-name: Defines a macro that ends when a blank line under macdef is encountered.

29.mdelete[remote-file]: Delete remote host files.

30.mdir remote-files local-file: Similar to dir, but you can specify multiple remote files, such as: mdir *.o.*.zipoutfile

31.mget remote-files : Transfer multiple remote files.

32.mkdir dir-name: Create a directory in the remote host.

33.mls remote-file local-file: Same as nlist, but you can specify multiple file names.

34.mode[modename]: Set the file transfer mode to modename, the default is stream mode.

35.modtime file-name: Displays the last modification time of the remote host file.

36.mput local-file: Transfer multiple files to a remote host.

37.newer file-name: If the file-name modification time of the remote machine is closer than the time of the file with the same name on the local hard disk, retransmit the file.

38.nlist[remote-dir][local-file]: Displays a list of files in the remote host directory and stores them in the local-file of the local hard disk.

Copyright © Windows knowledge All Rights Reserved