Linux under the FTP command line using fine extraction __linux

Source: Internet
Author: User
Tags chmod exit in ftp commands parent directory remote ftp server runique
FTP commands are one of the most frequently used commands for Internet users, and a large number of FTP internal commands are encountered, whether using FTP under a DOS or UNIX operating system. Familiar with and flexible application of FTP internal command, can greatly facilitate users, and received a multiplier effect.

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

-V Displays all response information for the remote server;
-D use debugging mode;
-I limit FTP automatic login, that is not used;
-N etrc file;
-G cancels the global filename.

The internal commands used by FTP are as follows (the brackets indicate an option):
1.! [Cmd[args]]: Perform interactive shell,exit in the local machine back to the FTP environment, such as:!ls*.zip.

2. $ Macro-ame[args]: Perform macro definition macro-name.

3. Account[password]: Provides the additional password required to access system resources after a successful logon to the remote system.

4.append Local-file[remote-file]: Appends the local file to the remote system host and uses the local file name if no remote system file name is specified.

5. ASCII: Using the ASCII type transfer mode.

6. Bell: After each command completes, the computer rings once.

7. Bin: Use binary file transfer mode.

8. Bye: Exits the FTP session process.

9. Case: When using Mget, the capitalization of the remote host file name is converted to lowercase letters.

CD Remote-dir: Into the remote host directory.

Cdup: Enter the parent directory of the remote host directory.

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

Close: Interrupts the FTP session with the remote server (corresponding to open).

CR: Converts a carriage return line to a back line when the file is transferred using the Asscii method.

Delete remote-file: Deletes a remote host file.

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

17.dir[remote-dir][local-file]: Displays the remote host directory and stores the results in the local file local-file.

Disconnection: Same as close.

Form format: Sets the file transfer mode to format, by default, by file mode.

Remote-file[local-file]: Passes the remote host's file Remote-file to the local-file of the local hard drive.

Glob: Sets the file name extension for Mdelete,mget,mput, which does not extend the file name by default, and the-G parameter of the command line.

Hash: Displays a hash symbol (#) for each 1024-byte transmission.

Help[cmd]: Displays help information for the FTP internal command cmd, such as aid get.

Idle[seconds]: Sets the remote server's hibernate timer to [seconds] seconds.

Image: Sets the binary transmission mode (same binary).

LCD[DIR]: Switches the local working directory to dir.

Ls[remote-dir][local-file]: Displays the remote directory Remote-dir and stores the local file Local-file.

Macdef Macro-name: Defines a macro that, when it encounters an empty row under Macdef, ends the macro definition.

Mdelete[remote-file]: Deletes a remote host file.

Mdir remote-files Local-file: Similar to dir, but can specify multiple remote files, such as: Mdir *.o.*.zipoutfile.

Mget remote-files: Transferring multiple remote files.

mkdir dir-name: Build a directory in a remote host.

MLS Remote-file Local-file: With nlist, but multiple filenames can be specified.

Mode[modename]: Set file transfer mode to Modename, default to stream mode.

Modtime file-name: Displays the last modified time of the remote host file.

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

Newer file-name: If the file-name in the remote machine is modified more closely than the local hard disk file with the same name, the file is retransmission.

Nlist[remote-dir][local-file]: Displays a list of files for the remote host directory and stores the Local-file on the local hard drive.

Nmap[inpattern Outpattern]: Set file name Mapping mechanism, so that when file transfer, some characters in the file are converted to each other, such as: Nmap $1.$2.$3[$1,$2]. [$2,$3], the file name changes to A1,A2 when the file is transferred a1.a2.a3. This command is particularly useful for situations where a remote host is not a UNIX machine.

Ntrans[inchars[outchars]]: To set the translation mechanism for a file name character, such as NTRANS1R, the filename lll will become RRR.

Host[port Open]: establishes a specified FTP server connection that specifies the connection port.

Passive: Enter the passive transmission mode.

Prompt: Set up interactive prompts for multiple file transfers.

Proxy ftp-cmd: In a secondary control connection, an FTP command is executed that allows two FTP servers to be connected to transfer files between two servers. The first FTP command must be open to establish a connection between two servers first.

Put Local-file[remote-file]: Transfer local file Local-file to a remote host.

PWD: Displays the current working directory of the remote host.

Quit: With bye, quit the ftp session.

Quote Arg1,arg2 ... : sends the parameter verbatim to the remote FTP server, such as: Quote Syst.

Recv Remote-file[local-file]: with Get.

Reget Remote-file[local-file]: similar to get, but if local-file exists, it is resumed from the last transmission interrupt.

Rhelp[cmd-name]: Ask for help from a remote host.

Rstatus[file-name]: If no filename is specified, the status of the remote host is displayed, otherwise the file status is displayed.

Rename[from][to]: Change the remote host file name.

Reset: Clears the answer queue.

Restart marker: From the specified flag marker, restart get or put, such as: Restart 130.

RmDir dir-name: Deletes the remote host directory.

Runique: Set file name uniqueness store.

Local-file[remote-file send]: same put.

SendPort: Set the use of the port command.

Site Arg1,arg2 ... : sends the parameter as a site command to a remote FTP host verbatim.

Size File-name: Displays the remote host file size, such as: Site Idle 7200.

Status: Displays the current FTP status.

Struct[struct-name]: Sets the file transfer structure to struct-name, using the stream structure by default.

Sunique: Sets the remote host file name store to unique (corresponds to the Runique).

System: Displays the type of OS for a remote host.

Tenex: Sets the file transfer type to the desired type for the Tenex machine.

TICK: Sets the byte counter at the time of transmission.

Trace: Set package tracking.

Type[type-name]: Set file Transfer Type to Type-name, default to ASCII, such as: Type binary, set binary transmission mode.

Umask[newmask]: Set the remote server's default umask to Newmask, such as: Umask 3.
User User-name[password][account]: to the remote host to indicate their identity, require a password, you must enter a password, such as: User anonymous my@email.

VERBOSE: the-v parameter with the command line, which is set to report in detail, all responses to the FTP server are displayed to the user, and the default is on.

73.? [cmd]: With help.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.