0137-0138.html
来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 309 行
HTML
309 行
<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="0135-0136.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0139-0140.html">Next</A></CENTER></P>
<A NAME="PAGENUM-137"><P>Page 137</P></A>
<P>Permission is granted to copy and distribute translations of this manual into another language, under the above
conditions for modified versions, except that this permission notice may be included in translations approved by the Free
Software Foundation instead of in the original English.
</P>
<P>GNU Tools, 19 April 1994
</P>
<H3><A NAME="ch01_ 66">
expand
</A></H3>
<P>expand—Convert tabs to spaces
</P>
<P><B>
SYNOPSIS
</B></P>
<!-- CODE SNIP //-->
<PRE>
expand [_tab1[,tab2[,...]]] [_t tab1[,tab2[,...]]] [_i] [—tabs=tab1[,tab2[,...]]]
[--initial] [--help] [--version] [file...]
</PRE>
<!-- END CODE SNIP //-->
<P><B>
DESCRIPTION
</B></P>
<P>This manual page documents the GNU version of
expand. expand writes the contents of each given file, or the standard
input if none are given or when a file named _ is given, to the standard output, with tab characters converted to the
appropriate number of spaces. By default, expand converts all tabs to spaces. It preserves backspace characters in the output;
they decrement the column count for tab calculations. The default action is equivalent to
_8 (set tabs every 8 columns).
</P>
<P><B>
OPTIONS
</B></P>
<TABLE>
<TR><TD>
_, _t, --tabs tab1[,tab2[,...]]
</TD><TD>
If only one tab stop is given, set the tabs
tab1 spaces apart instead of the default 8. Otherwise, set the tabs at
columns tab1, tab2, and so forth (numbered from 0)
and replace any tabs beyond the tab stops given with single spaces. If the tab-stops
are specified with the _t or --tabs option, they can be separated by blanks as well as
by commas.
</TD></TR><TR><TD>
-i, --initial
</TD><TD>
Only convert initial tabs (those that precede all nonspace or tab characters) on
each line to spaces.
</TD></TR><TR><TD>
--help
</TD><TD>
Print a usage message and exit with a nonzero status.
</TD></TR><TR><TD>
--version
</TD><TD>
Print version information on standard output then exit.
</TD></TR><TR><TD>
GNU Text Utilities
</TD><TD>
</TD></TR></TABLE>
<H3><A NAME="ch01_ 67">
find
</A></H3>
<P>find—Search for files in a directory hierarchy
</P>
<P><B>
SYNOPSIS
</B></P>
<!-- CODE SNIP //-->
<PRE>
find [path...] [expression]
</PRE>
<!-- END CODE SNIP //-->
<P><B>
DESCRIPTION
</B></P>
<P>This manual page documents the GNU version of
find. find searches the directory tree rooted at each given filename
by evaluating the given expression from left to right, according to the rules of precedence (see "Operators," later in this
manual page), until the outcome is known (the left side is
False for AND operations, True for OR), at which point
find moves on to the next filename.
</P>
<P>The first argument that begins with _, (, ), ,, or
! is taken to be the beginning of the expression; any arguments before it
are paths to search, and any arguments after it are the rest of the expression. If no paths are given, the current directory is used.
If no expression is given, the expression _print is used.
</P>
<P>find exits with status 0 if all files are processed successfully, greater than
0 if errors occur.
</P>
<A NAME="PAGENUM-138"><P>Page 138</P></A>
<P><B>
EXPRESSIONS
</B></P>
<P>The expression is made up of options (which affect overall operation rather than the processing of a specific file, and
always return True), tests (which return a True or
False value), and actions (which have side effects and return a
True or False value), all separated by operators.
_and is assumed where the operator is omitted. If the expression contains no actions other than
_prune, _print is performed on all files for which the expression is true.
</P>
<P><B>
OPTIONS
</B></P>
<P>All options always return True. They always take effect, rather than being processed only when their place in the expression
is reached. Therefore, for clarity, it is best to place them at the beginning of the expression.
</P>
<TABLE>
<TR><TD>
_daystart
</TD><TD>
Measure times (for _amin, _atime,
_cmin, _ctime, _mmin, and _mtime) from the beginning of
today rather than from 24 hours ago.
</TD></TR><TR><TD>
_depth
</TD><TD>
Process each directory's contents before the directory itself.
</TD></TR><TR><TD>
_follow
</TD><TD>
Dereference symbolic links. Implies
_noleaf.
</TD></TR><TR><TD>
_help, —help
</TD><TD>
Print a summary of the command-line usage of
find and exit.
</TD></TR><TR><TD>
_maxdepth levels
</TD><TD>
Descend at most levels (a nonnegative integer) levels of directories below the
command-line arguments. _maxdepth 0 means only apply the tests and actions to the command-line arguments.
</TD></TR><TR><TD>
_mindepth levels
</TD><TD>
Do not apply any tests or actions at levels less than
levels (a nonnegative integer). _mindepth 1 means process all files except the command-line arguments.
</TD></TR><TR><TD>
_mount
</TD><TD>
Don't descend directories on other filesystems. An alternate name for
_xdev, for compatibility with some other versions of
find.
</TD></TR><TR><TD>
_noleaf
</TD><TD>
Do not optimize by assuming that directories contain two fewer subdirectories than their hard
link count. This option is needed when searching filesystems that do not follow the UNIX
directory-link convention, such as CD-ROM or MS-DOS filesystems or AFS volume mount points.
Each directory on a normal UNIX filesystem has at least 2 hard links: its name and its
. entry. Additionally, its subdirectories (if any) each have a
.. entry linked to that directory. When find is
examining a directory, after it has statted two fewer subdirectories than the directory's link count, it
knows that the rest of the entries in the directory are nondirectories
(leaf files in the directory tree). If only the files' names need to be examined, there is no need to stat them; this gives a
significant increase in search speed.
</TD></TR><TR><TD>
_version, —version
</TD><TD>
Print the find version number and exit.
</TD></TR><TR><TD>
_xdev
</TD><TD>
Don't descend directories on other filesystems.
</TD></TR></TABLE>
<P><B>
TESTS
</B></P>
<P>Numeric arguments can be specified as
</P>
<TABLE>
<TR><TD>
+n
</TD><TD>
Greater than n.
</TD></TR><TR><TD>
_n
</TD><TD>
Less than n.
</TD></TR><TR><TD>
n
</TD><TD>
Exactly n.
</TD></TR><TR><TD>
_amin n
</TD><TD>
File was last accessed n minutes ago.
</TD></TR><TR><TD>
_anewer file
</TD><TD>
File was last accessed more recently than
file was modified. _anewer is affected by _follow only if
_follow comes before _anewer on the command line.
</TD></TR><TR><TD>
_atime n
</TD><TD>
File was last accessed n*24 hours ago.
</TD></TR><TR><TD>
_cmin n
</TD><TD>
File's status was last changed n minutes ago.
</TD></TR><TR><TD>
_cnewer file
</TD><TD>
File's status was last changed more recently than file was
modified. _cnewer is affected by _follow only if
_follow comes before _cnewer on the command line.
</TD></TR><TR><TD>
_ctime n
</TD><TD>
File's status was last changed
n*24 hours ago.
</TD></TR><TR><TD>
_empty
</TD><TD>
File is empty and is either a regular file or a directory.
</TD></TR><TR><TD>
_false
</TD><TD>
Always false.
</TD></TR></TABLE>
<P><CENTER>
<a href="0135-0136.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0139-0140.html">Next</A></CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?