📄 0150-0151.html
字号:
<HTML>
<HEAD>
<TITLE>Linux Complete Command Reference:User Commands:EarthWeb Inc.-</TITLE>
</HEAD>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!-- ISBN=0672311046 //-->
<!-- TITLE=Linux Complete Command Reference//-->
<!-- AUTHOR=Red Hat//-->
<!-- PUBLISHER=Macmillan Computer Publishing//-->
<!-- IMPRINT=Sams//-->
<!-- CHAPTER=01 //-->
<!-- PAGES=0001-0736 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="0149-0149.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0152-0153.html">Next</A></CENTER></P>
<A NAME="PAGENUM-150"><P>Page 150</P></A>
<TABLE>
<TR><TD>
mdir remote-files local-file
</TD><TD>
Like dir, except multiple remote files may be specified. If interactive prompting
is on, ftp will prompt the user to verify that the last argument is indeed the target
local file for receiving mdir output.
</TD></TR><TR><TD>
mget remote-files
</TD><TD>
Expand the remote-files on the remote machine and do a get for each filename
thus produced. See glob for details on the filename expansion. Resulting filenames
will then be processed according to case, ntrans, and
nmap settings. Files are transferred into the local working directory, which can be changed with
lcd directory ; new local directories can be created with
!mkdir directory.
</TD></TR><TR><TD>
mkdir directory-name
</TD><TD>
Make a directory on the remote machine.
</TD></TR><TR><TD>
mls remote-files local-file
</TD><TD>
Like nlist, except multiple remote files may be specified, and the
local-file must be specified. If interactive prompting is on,
ftp will prompt the user to verify that the last argument is indeed the target local file for receiving
mls output.
</TD></TR><TR><TD>
mode [mode-name]
</TD><TD>
Set the file transfer mode to
mode-name. The default mode is stream mode.
</TD></TR><TR><TD>
modtime file-name
</TD><TD>
Show the last modification time of the file on the remote machine.
</TD></TR><TR><TD>
mput local-files
</TD><TD>
Expand wildcards in the list of local files given as arguments and do a
put for each file in the resulting list. See glob for details of filename expansion.
Resulting filenames will then be processed according to
ntrans and nmap settings.
</TD></TR><TR><TD>
newer file-name
</TD><TD>
Get the file only if the modification time of the remote file is more recent that
the file on the current system. If the file does not exist on the current system, the
remote file is considered newer. Otherwise, this command is identical to
get.
</TD></TR><TR><TD>
nlist [remote-directory]
[local-file]
</TD><TD>
Print a list of the files in a directory on the remote machine. If
remote-directory is
left unspecified, the current working directory is used. If interactive prompting is
on, ftp will prompt the user to verify that the last argument is indeed the target local
file for receiving nlist output. If no local file is specified, or if
local-file is -, the output is sent to the terminal.
</TD></TR><TR><TD>
nmap [inpattern] outpattern
</TD><TD>
Set or unset the
filename mapping mechanism. If no arguments are specified,
the filename mapping mechanism is unset. If arguments are specified, remote
filenames are mapped during mput commands and put commands issued without a
specified remote target filename. If arguments are specified, local filenames are mapped
during mget commands and get commands issued without a specified local target
filename. This command is useful when connecting to a non-UNIX remote computer
with different file naming conventions or practices. The mapping follows the pattern
set by inpattern and outpattern. Inpattern is a template for incoming filenames
(which may have already been processed according to
the ntrans and case settings). Variable templating is accomplished by including the sequences
$1, $2,..., $9 in inpattern. Use \ to prevent this special treatment of the
$ character. All other characters are treated literally, and are used to determine the
nmap inpattern variable values. For example, given
inpattern $1.$2 and the remote filename
mydata.data, $1 would have the value mydata, and
$2 would have the value "data". The
outpattern determines the resulting mapped filename. The sequences
$1, $2,...., $9 are replaced by any value resulting from the
inpattern template. The sequence $0 is replaced by the
original filename. Additionally, the sequence seq1,
seq2 is replaced by seq1 if seq1 is not a null string; otherwise, it is replaced by
seq2. For example, the command nmap $1.$2.$3
[$1,$2].[$2,file] would yield the output filename
myfile.data for input filenames my-file. data and
myfile.data.old, myfile.file for the input filename
my-file, and myfile.myfile for the input filename
.myfile. Spaces may be included in outpattern, as in the example:
nmap $1 sed "s/ *$//" > $1. Use the \ character to prevent special treatment of the
$, [, [, and , characters.
</TD></TR><TR><TD>
ntrans [inchars] [outchars]
</TD><TD>
Set or unset the filename character translation mechanism. If no arguments
are specified, the filename character translation mechanism is unset. If arguments
are specified, characters in remote filenames are translated during
mput commands and
</TD></TR></TABLE>
<A NAME="PAGENUM-151"><P>Page 151</P></A>
<TABLE>
<TR><TD>
</TD><TD>
put commands issued without a specified remote target filename. If arguments
are specified, characters in local filenames are translated during
mget commands and get commands issued without a specified local target filename. This command is
useful when connecting to a non-UNIX remote computer with different file
naming conventions or practices. Characters in a filename matching a character in
inchars are replaced with the corresponding character in
outchars. If the character's position in inchars is longer than the length of
outchars, the character is deleted from the filename.
</TD></TR><TR><TD>
open host [port]
</TD><TD>
Establish a connection to the specified host FTP server. An optional port
number may be supplied, in which case, ftp will attempt to contact an FTP server at
that port. If the auto-login option is on (default),
ftp will also attempt to automatically log the user in to the FTP server (see below).
</TD></TR><TR><TD>
prompt
</TD><TD>
Toggle interactive prompting. Interactive prompting occurs during multiple
file transfers to allow the user to selectively retrieve or store files. If prompting is
turned off (default is on), any mget or mput will transfer all files, and any
mdelete will delete all files.
</TD></TR><TR><TD>
proxy ftp-command
</TD><TD>
Execute an ftp command on a secondary control connection. This command
allows simultaneous connection to two remote FTP servers for transferring files
between the two servers. The first proxy command should be an
open, to establish the secondary control connection. Enter the command
"proxy ?" to see other ftp commands executable on the secondary connection. The following
commands behave differently when prefaced by proxy
:, open will not define new macros during the auto-login process,
close will not erase existing macro definitions,
get and mget transfer files from the host on the primary control connection to the host on
the secondary control connection, and put, mput, and
append transfer files from the host on the secondary control connection to the host on the primary control
connection. Third-party file transfers depend upon support of the FTP protocol
PASV command by the server on the secondary control connection.
</TD></TR><TR><TD>
put local-file [remote-file]
</TD><TD>
Store a local file on the remote machine. If
remote-file is left unspecified, the local filename is used after processing according to any
ntrans or nmap settings in naming the remote file. File transfer uses the current settings for
type, format, mode, and structure.
</TD></TR><TR><TD>
pwd
</TD><TD>
Print the name of the current working directory on the remote machine.
</TD></TR><TR><TD>
quit
</TD><TD>
A synonym for bye.
</TD></TR><TR><TD>
quote arg1 arg2...
</TD><TD>
The arguments specified are sent, verbatim, to the remote FTP server.
</TD></TR><TR><TD>
recv remote-file [local-file]
</TD><TD>
A synonym for
get.
</TD></TR><TR><TD>
reget remote-file [local-file]
</TD><TD>
Reget acts
like get, except that if local-file exists and is smaller than
remote-file, local-file is presumed to be a partially transferred copy of
remote-file and the transfer is continued from the apparent point of failure. This command is
useful when transferring very large files over networks that are prone to
dropping connections.
</TD></TR><TR><TD>
remotehelp [command-name]
</TD><TD>
Request help from the remote FTP server. If a
command-name is specified, it is supplied to the server as well.
</TD></TR><TR><TD>
remotestatus [file-name]
</TD><TD>
With no arguments, show status of remote machine. If
file-name is specified, show status of file-name on remote machine.
</TD></TR><TR><TD>
rename [from] [to]
</TD><TD>
Rename the file from on the remote machine, to the file
to.
</TD></TR><TR><TD>
reset
</TD><TD>
Clear reply queue. This command resynchronizes command/reply sequencing
with the remote FTP server. Resynchronization may be necessary following a violation
of the FTP protocol by the remote server.
</TD></TR><TR><TD>
restart marker
</TD><TD>
Restart the immediately following
get or put at the indicated marker. On UNIX systems,
marker is usually a byte offset into the file.
</TD></TR></TABLE>
<P><CENTER>
<a href="0149-0149.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0152-0153.html">Next</A></CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -