[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to grep/manual/html_node/File-and-Directory-Selection.html,v
From: |
Jim Meyering |
Subject: |
Changes to grep/manual/html_node/File-and-Directory-Selection.html,v |
Date: |
Fri, 02 Mar 2012 09:28:40 +0000 |
CVSROOT: /webcvs/grep
Module name: grep
Changes by: Jim Meyering <meyering> 12/03/02 09:28:32
Index: html_node/File-and-Directory-Selection.html
===================================================================
RCS file: /webcvs/grep/grep/manual/html_node/File-and-Directory-Selection.html,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- html_node/File-and-Directory-Selection.html 25 Jun 2011 09:28:45 -0000
1.9
+++ html_node/File-and-Directory-Selection.html 2 Mar 2012 09:28:29 -0000
1.10
@@ -1,8 +1,8 @@
<html lang="en">
<head>
-<title>File and Directory Selection - GNU Grep 2.9</title>
+<title>File and Directory Selection - GNU Grep 2.11</title>
<meta http-equiv="Content-Type" content="text/html">
-<meta name="description" content="GNU Grep 2.9">
+<meta name="description" content="GNU Grep 2.11">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Command_002dline-Options.html#Command_002dline-Options"
title="Command-line Options">
@@ -12,7 +12,8 @@
<!--
This manual is for `grep', a pattern matching engine.
-Copyright (C) 1999-2002, 2005, 2008-2011 Free Software Foundation, Inc.
+Copyright (C) 1999-2002, 2005, 2008-2012 Free Software Foundation,
+Inc.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
@@ -47,33 +48,36 @@
<h4 class="subsection">2.1.6 File and Directory Selection</h4>
<dl>
-<dt>‘<samp><span
class="samp">-a</span></samp>’<dt>‘<samp><span
class="samp">--text</span></samp>’<dd><a name="index-g_t_002da-92"></a><a
name="index-g_t_002d_002dtext-93"></a><a
name="index-suppress-binary-data-94"></a><a
name="index-binary-files-95"></a>Process a binary file as if it were text;
+<dt><samp><span class="option">-a</span></samp><dt><samp><span
class="option">--text</span></samp><dd><a name="index-g_t_002da-92"></a><a
name="index-g_t_002d_002dtext-93"></a><a
name="index-suppress-binary-data-94"></a><a
name="index-binary-files-95"></a>Process a binary file as if it were text;
this is equivalent to the ‘<samp><span
class="samp">--binary-files=text</span></samp>’ option.
- <dt>‘<samp><span
class="samp">--binary-files=</span><var>type</var></samp>’<dd><a
name="index-g_t_002d_002dbinary_002dfiles-96"></a><a
name="index-binary-files-97"></a>If the first few bytes of a file indicate that
the file contains binary data,
+ <br><dt><samp><span
class="option">--binary-files=</span><var>type</var></samp><dd><a
name="index-g_t_002d_002dbinary_002dfiles-96"></a><a
name="index-binary-files-97"></a>If the first few bytes of a file indicate that
the file contains binary data,
assume that the file is of type <var>type</var>.
By default, <var>type</var> is ‘<samp><span
class="samp">binary</span></samp>’,
and <samp><span class="command">grep</span></samp> normally outputs either
a one-line message saying that a binary file matches,
or no message if there is no match.
-If <var>type</var> is ‘<samp><span
class="samp">without-match</span></samp>’,
+
+ <p>If <var>type</var> is ‘<samp><span
class="samp">without-match</span></samp>’,
<samp><span class="command">grep</span></samp> assumes that a binary file does
not match;
-this is equivalent to the ‘<samp><span
class="samp">-I</span></samp>’ option.
-If <var>type</var> is ‘<samp><span
class="samp">text</span></samp>’,
+this is equivalent to the <samp><span class="option">-I</span></samp> option.
+
+ <p>If <var>type</var> is ‘<samp><span
class="samp">text</span></samp>’,
<samp><span class="command">grep</span></samp> processes a binary file as if
it were text;
-this is equivalent to the ‘<samp><span
class="samp">-a</span></samp>’ option.
-<em>Warning:</em> ‘<samp><span
class="samp">--binary-files=text</span></samp>’ might output binary
garbage,
+this is equivalent to the <samp><span class="option">-a</span></samp> option.
+
+ <p><em>Warning:</em> ‘<samp><span
class="samp">--binary-files=text</span></samp>’ might output binary
garbage,
which can have nasty side effects
if the output is a terminal and
if the terminal driver interprets some of it as commands.
- <br><dt>‘<samp><span class="samp">-D
</span><var>action</var></samp>’<dt>‘<samp><span
class="samp">--devices=</span><var>action</var></samp>’<dd><a
name="index-g_t_002dD-98"></a><a name="index-g_t_002d_002ddevices-99"></a><a
name="index-device-search-100"></a>If an input file is a device, FIFO, or
socket, use <var>action</var> to process it.
+ <br><dt><samp><span class="option">-D
</span><var>action</var></samp><dt><samp><span
class="option">--devices=</span><var>action</var></samp><dd><a
name="index-g_t_002dD-98"></a><a name="index-g_t_002d_002ddevices-99"></a><a
name="index-device-search-100"></a>If an input file is a device, FIFO, or
socket, use <var>action</var> to process it.
By default, <var>action</var> is ‘<samp><span
class="samp">read</span></samp>’,
which means that devices are read just as if they were ordinary files.
If <var>action</var> is ‘<samp><span
class="samp">skip</span></samp>’,
devices, FIFOs, and sockets are silently skipped.
- <br><dt>‘<samp><span class="samp">-d
</span><var>action</var></samp>’<dt>‘<samp><span
class="samp">--directories=</span><var>action</var></samp>’<dd><a
name="index-g_t_002dd-101"></a><a
name="index-g_t_002d_002ddirectories-102"></a><a
name="index-directory-search-103"></a>If an input file is a directory, use
<var>action</var> to process it.
+ <br><dt><samp><span class="option">-d
</span><var>action</var></samp><dt><samp><span
class="option">--directories=</span><var>action</var></samp><dd><a
name="index-g_t_002dd-101"></a><a
name="index-g_t_002d_002ddirectories-102"></a><a
name="index-directory-search-103"></a>If an input file is a directory, use
<var>action</var> to process it.
By default, <var>action</var> is ‘<samp><span
class="samp">read</span></samp>’,
which means that directories are read just as if they were ordinary files
(some operating systems and file systems disallow this,
@@ -82,28 +86,28 @@
If <var>action</var> is ‘<samp><span
class="samp">skip</span></samp>’, directories are silently skipped.
If <var>action</var> is ‘<samp><span
class="samp">recurse</span></samp>’,
<samp><span class="command">grep</span></samp> reads all files under each
directory, recursively;
-this is equivalent to the ‘<samp><span
class="samp">-r</span></samp>’ option.
+this is equivalent to the <samp><span class="option">-r</span></samp> option.
- <br><dt>‘<samp><span
class="samp">--exclude=</span><var>glob</var></samp>’<dd><a
name="index-g_t_002d_002dexclude-104"></a><a
name="index-exclude-files-105"></a><a
name="index-searching-directory-trees-106"></a>Skip files whose base name
matches <var>glob</var>
+ <br><dt><samp><span
class="option">--exclude=</span><var>glob</var></samp><dd><a
name="index-g_t_002d_002dexclude-104"></a><a
name="index-exclude-files-105"></a><a
name="index-searching-directory-trees-106"></a>Skip files whose base name
matches <var>glob</var>
(using wildcard matching).
A file-name glob can use
‘<samp><span class="samp">*</span></samp>’, ‘<samp><span
class="samp">?</span></samp>’, and ‘<samp><span
class="samp">[</span></samp>’...‘<samp><span
class="samp">]</span></samp>’ as wildcards,
and <code>\</code> to quote a wildcard or backslash character literally.
- <br><dt>‘<samp><span
class="samp">--exclude-from=</span><var>file</var></samp>’<dd><a
name="index-g_t_002d_002dexclude_002dfrom-107"></a><a
name="index-exclude-files-108"></a><a
name="index-searching-directory-trees-109"></a>Skip files whose base name
matches any of the file-name globs
+ <br><dt><samp><span
class="option">--exclude-from=</span><var>file</var></samp><dd><a
name="index-g_t_002d_002dexclude_002dfrom-107"></a><a
name="index-exclude-files-108"></a><a
name="index-searching-directory-trees-109"></a>Skip files whose base name
matches any of the file-name globs
read from <var>file</var> (using wildcard matching as described
-under ‘<samp><span class="samp">--exclude</span></samp>’).
+under <samp><span class="option">--exclude</span></samp>).
- <br><dt>‘<samp><span
class="samp">--exclude-dir=</span><var>dir</var></samp>’<dd><a
name="index-g_t_002d_002dexclude_002ddir-110"></a><a
name="index-exclude-directories-111"></a>Exclude directories matching the
pattern <var>dir</var> from recursive
+ <br><dt><samp><span
class="option">--exclude-dir=</span><var>dir</var></samp><dd><a
name="index-g_t_002d_002dexclude_002ddir-110"></a><a
name="index-exclude-directories-111"></a>Exclude directories matching the
pattern <var>dir</var> from recursive
directory searches.
- <br><dt>‘<samp><span
class="samp">-I</span></samp>’<dd>Process a binary file as if it did not
contain matching data;
+ <br><dt><samp><span class="option">-I</span></samp><dd>Process a binary
file as if it did not contain matching data;
this is equivalent to the ‘<samp><span
class="samp">--binary-files=without-match</span></samp>’ option.
- <br><dt>‘<samp><span
class="samp">--include=</span><var>glob</var></samp>’<dd><a
name="index-g_t_002d_002dinclude-112"></a><a
name="index-include-files-113"></a><a
name="index-searching-directory-trees-114"></a>Search only files whose base
name matches <var>glob</var>
-(using wildcard matching as described under ‘<samp><span
class="samp">--exclude</span></samp>’).
+ <br><dt><samp><span
class="option">--include=</span><var>glob</var></samp><dd><a
name="index-g_t_002d_002dinclude-112"></a><a
name="index-include-files-113"></a><a
name="index-searching-directory-trees-114"></a>Search only files whose base
name matches <var>glob</var>
+(using wildcard matching as described under <samp><span
class="option">--exclude</span></samp>).
- <br><dt>‘<samp><span
class="samp">-r</span></samp>’<dt>‘<samp><span
class="samp">-R</span></samp>’<dt>‘<samp><span
class="samp">--recursive</span></samp>’<dd><a
name="index-g_t_002dr-115"></a><a
name="index-g_t_002d_002drecursive-116"></a><a
name="index-recursive-search-117"></a><a
name="index-searching-directory-trees-118"></a>For each directory mentioned on
the command line,
+ <br><dt><samp><span class="option">-r</span></samp><dt><samp><span
class="option">-R</span></samp><dt><samp><span
class="option">--recursive</span></samp><dd><a
name="index-g_t_002dr-115"></a><a
name="index-g_t_002d_002drecursive-116"></a><a
name="index-recursive-search-117"></a><a
name="index-searching-directory-trees-118"></a>For each directory operand,
read and process all files in that directory, recursively.
This is the same as the ‘<samp><span
class="samp">--directories=recurse</span></samp>’ option.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Changes to grep/manual/html_node/File-and-Directory-Selection.html,v,
Jim Meyering <=