0293-0295.html
来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 395 行
HTML
395 行
<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="0291-0292.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0296-0297.html">Next</A></CENTER></P>
<A NAME="PAGENUM-293"><P>Page 293</P></A>
<P><B>ENVIRONMENT</B></P>
<P>REFER Default database
</P>
<P><B>FILES</B></P>
<TABLE>
<TR><TD>
/usr/dict/papers/Ind
</TD><TD>
Default database to be used if the
REFER ENVIRONMENT variable is not set.
</TD></TR><TR><TD>
filename.i
</TD><TD>
Index FILES.
</TD></TR></TABLE>
<P><B>SEE ALSO</B></P>
<!-- CODE SNIP //-->
<PRE>grefer(1), glookbib(1), gindxbib(1)
</PRE>
<!-- END CODE SNIP //-->
<P>Groff Version 1.09, 6 August 1992
</P>
<H3><A NAME="ch01_ 143">
ln
</A></H3>
<P>ln—Make links between FILES
</P>
<P><B>SYNOPSIS</B></P>
<!-- CODE SNIP //-->
<PRE>ln [OPTIONS] source [dest]
ln [OPTIONS] source... directory
</PRE>
<!-- END CODE SNIP //-->
<P>OPTIONS:
</P>
<!-- CODE //-->
<PRE>[_bdfinsvF] [_S backup-suffix] [_V {numbered,existing,simple}]
[--version-control={numbered,existing,simple}] [--backup] [--directory]
[--force] [--interactive] [--no_dereference] [--symbolic] [--verbose]
[--suffix=backup-suffix] [--help] [--version]
</PRE>
<!-- END CODE //-->
<P><B>DESCRIPTION</B></P>
<P>This manual page documents the GNU version of
ln. If the last argument names an existing directory,
ln links each other given file into a file with the same name in that directory. If only one file is given, it links that file into the current
directory. Otherwise, if only two FILES are given, it links the first onto the second. It is an error if the last argument is not a
directory and more than two FILES are given. It makes hard links by default. By default, it does not remove existing FILES.
</P>
<P><B>OPTIONS</B></P>
<TABLE>
<TR><TD>
_b, --backup
</TD><TD>
Make backups of FILES that are about to be removed.
</TD></TR><TR><TD>
_d, _F, --directory
</TD><TD>
Allow the superuser to make hard links to directories.
</TD></TR><TR><TD>
_f, --force
</TD><TD>
Remove existing destination FILES.
</TD></TR><TR><TD>
_i, --interactive
</TD><TD>
Prompt whether to remove existing destination FILES.
</TD></TR><TR><TD>
_n, --no-dereference
</TD><TD>
When the specified destination is a symbolic link to a directory, attempt to replace
the symbolic link rather than dereferencing it to create a link in the directory to which it
points. This option is most useful in conjunction with
--force.
</TD></TR><TR><TD>
_s, --symbolic
</TD><TD>
Make symbolic links instead of hard links. This option produces an error message
on systems that do not support symbolic links.
</TD></TR><TR><TD>
_v, --verbose
</TD><TD>
Print the name of each file before linking it.
</TD></TR><TR><TD>
--help
</TD><TD>
Print a usage message on standard output and exit successfully.
</TD></TR><TR><TD>
--version
</TD><TD>
Print version information on standard output then exit successfully.
</TD></TR><TR><TD>
_S, --suffix backup-suffix
</TD><TD>
The suffix used for making simple backup FILES can be set with the
SIMPLE_BACKUP_SUFFIX ENVIRONMENT variable, which can be overridden by this option. If neither of those is
given, the default is ~, as it is in Emacs.
</TD></TR></TABLE>
<A NAME="PAGENUM-294"><P>Page 294</P></A>
<TABLE>
<TR><TD>
_V, --version-control
{numbered,existing,simple}
</TD><TD>
The type of backups made can be set with the
VERSION_CONTROL ENVIRONMENT variable, which
can be overridden by this option. If
VERSION_CONTROL is not set and this option is not
given, the default backup type is existing. The value of the
VERSION_CONTROL ENVIRONMENT variable and the argument to this option are like the GNU Emacs
version-control variable; they also recognize synonyms that are more descriptive. The valid values (unique
abbreviations are accepted) are the following:
</TD></TR></TABLE>
<BLOCKQUOTE>
<TABLE>
<TR><TD>
t or numbered
</TD><TD>
Always make numbered backups.
</TD></TR><TR><TD>
nil or existing
</TD><TD>
Make numbered backups of FILES that already have them,
simple backups of the others.
</TD></TR><TR><TD>
never or simple
</TD><TD>
Always make simple backups.
</TD></TR></TABLE>
</BLOCKQUOTE>
<P>GNU File Utilities
</P>
<H3><A NAME="ch01_ 144">
lndir
</A></H3>
<P>lndir—Create a shadow directory of symbolic links to another directory tree
</P>
<P><B>SYNOPSIS</B></P>
<!-- CODE SNIP //-->
<PRE>lndir fromdir [todir]
</PRE>
<!-- END CODE SNIP //-->
<P><B>DESCRIPTION</B></P>
<P>lndir makes a shadow copy todir of a directory tree
fromdir, except that the shadow is not populated with real FILES
but instead with symbolic links pointing at the real FILES in the
fromdir directory tree. This is usually useful for
maintaining source code for different machine architectures. You create a shadow directory containing links to the real source which
you will have usually NFS mounted from a machine of a different architecture, and then recompile it. The object FILES will be
in the shadow directory, while the source FILES in the shadow directory are just symlinks to the real FILES.
</P>
<P>This has the advantage that if you update the source, you need not propagate the change to the other architectures by
hand because all source in shadow directories are symlinks to the real thing: Just
cd to the shadow directory and recompile away.
</P>
<P>The todir argument is optional and defaults to the current directory. The
fromdir argument may be relative (for example,
../src) and is relative to todir (not the current directory).
</P>
<P>Note that RCS, SCCS, and CVS.adm directories are not shadowed.
</P>
<P>If you add FILES, simply run lndir again. Deleting FILES is a more painful problem; the symlinks will just point into
never-neverland.
</P>
<P><B>BUGS</B></P>
<P>patch gets upset if it cannot change the FILES. You should never run
patch from a shadow directory anyway.
</P>
<P>You need to use something like this:
</P>
<!-- CODE SNIP //-->
<PRE>find todir _type l _print | xargs rm
</PRE>
<!-- END CODE SNIP //-->
<P>to clear out all FILES before you can relink (if
fromdir moved, for instance). Something like this:
</P>
<!-- CODE SNIP //-->
<PRE>find . \! _type d _print
</PRE>
<!-- END CODE SNIP //-->
<P>will find all FILES that are not directories.
</P>
<P>X Version 11 Release 6
</P>
<A NAME="PAGENUM-295"><P>Page 295</P></A>
<H3><A NAME="ch01_ 145">
locate
</A></H3>
<P>locate—List FILES in databases that match a pattern
</P>
<P><B>SYNOPSIS</B></P>
<!-- CODE SNIP //-->
<PRE>locate [_d path] [--database=path] [--version] [--help] pattern...
</PRE>
<!-- END CODE SNIP //-->
<P><B>DESCRIPTION</B></P>
<P>This manual page documents the GNU version of
locate. For each given pattern, locate searches one or more databases
of filenames and displays the filenames that contain the pattern. Patterns can contain shell-style meta characters:
*, ?, and []. The meta characters do not treat / or
. specially. Therefore, a pattern foo*bar can match a filename that contains
foo3/bar, and a pattern *duck* can match a filename that contains
lake/.ducky. Patterns that contain meta characters should be
quoted to protect them from expansion by the shell.
</P>
<P>If a pattern is a plain string—it contains no meta
characters—locate displays all filenames in the database that contain
that string anywhere. If a pattern does contain meta characters,
locate only displays filenames that match the pattern exactly. As
a result, patterns that contain meta characters should usually begin with a
* and will most often end with one as well. The exceptions are patterns that are intended to explicitly match the beginning or end of a filename.
</P>
<P>The filename databases contain lists of FILES that were on the system when the databases were last updated. The
system administrator can choose the filename of the default database, the frequency with which the databases are updated, and
the directories for which they contain entries; see
updatedb(1L).
</P>
<P><B>OPTIONS</B></P>
<TABLE>
<TR><TD>
_d path, --database=path
</TD><TD>
Instead of searching the default filename database, search the filename databases in
path, which is a colon-separated list of database filenames. You can also use the
ENVIRONMENT variable LOCATE_PATH to set the list of database FILES to search. The option overrides
the ENVIRONMENT variable if both are used.
</TD></TR><TR><TD>
</TD><TD>
The filename database format changed starting with GNU
find and locate version 4.0 to allow machines with different byte orderings to share the databases. This version of
locate can automatically recognize and read databases produced for older versions of GNU
locate or UNIX versions of locate or find.
</TD></TR><TR><TD>
--help
</TD><TD>
Print a summary of the OPTIONS to
locate and exit.
</TD></TR><TR><TD>
--version
</TD><TD>
Print the version number of
locate and exit.
</TD></TR></TABLE>
<P><B>ENVIRONMENT</B></P>
<P>LOCATE_PATH Colon-separated list of databases to search
</P>
<P><B>SEE ALSO</B></P>
<!-- CODE SNIP //-->
<PRE>find(1L), locatedb(5L), updatedb(1L), xargs(1L),
Finding FILES (online in info, or printed)
</PRE>
<!-- END CODE SNIP //-->
<H3><A NAME="ch01_ 146">
logger
</A></H3>
<P>logger—Make entries in the system log
</P>
<P><B>SYNOPSIS</B></P>
<!-- CODE SNIP //-->
<PRE>logger [-is] [-f file] [-p pri] [-t tag] [message ...]
</PRE>
<!-- END CODE SNIP //-->
<P><B>DESCRIPTION</B></P>
<P>logger provides a shell command interface to the
syslog(3) system log module.
</P>
<P><CENTER>
<a href="0291-0292.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0296-0297.html">Next</A></CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?