From 6c4833ac8ac984225d1ad5926ab9665b5d7e638a Mon Sep 17 00:00:00 2001 From: jay Date: Fri, 3 Dec 2004 17:53:37 +0000 Subject: [PATCH] Escape dashes with a backslash (for fix Savannah bug 11189). --- find/find.1 | 88 +++++++++++++++++++++++++++++------------------------------ xargs/xargs.1 | 34 +++++++++++------------ 2 files changed, 61 insertions(+), 61 deletions(-) diff --git a/find/find.1 b/find/find.1 index f1b8cac..67fbd34 100644 --- a/find/find.1 +++ b/find/find.1 @@ -3,7 +3,7 @@ find \- search for files in a directory hierarchy .SH SYNOPSIS .B find -[-H] [-L] [-P] [path...] [expression] +[\-H] [\-L] [\-P] [path...] [expression] .SH DESCRIPTION This manual page documents the GNU version of @@ -18,7 +18,7 @@ known (the left hand side is false for \fIand\fR operations, true for .B find moves on to the next file name. .PP -The `-H', `-L' and `-P' options control the treatment of symbolic +The `\-H', `\-L' and `\-P' options control the treatment of symbolic links. Command-line arguments following these are taken to be names of files or directories to be examined, up to the first argument that begins with `\-', `(', `)', `,', or `!'. That argument and any @@ -31,8 +31,8 @@ This manual page talks about `options' within the expression list. These options control the behaviour of .B find but are specified immediately after the last path name. The two -`real' options `-H', `-L' and `-P' must appear before the first path -name, if at all. +`real' options `\-H', `\-L' and `\-P' must appear before the first +path name, if at all. .SH OPTIONS .IP \-P Never follow symbolic links. This is the default behaviour. When @@ -71,10 +71,10 @@ rather than the link itself (unless the symbolic link is broken). Using \-H causes the \-lname and \-ilname predicates always to return false. .P -If more than one of \-H, \-L and -P are both specified, each overrides -the others; the last one appearing on the command line takes effect. -Since it is the default, the \-P option should be considered to be in -effect unless either \-H or \-L is specified. +If more than one of \-H, \-L and \-P are both specified, each +overrides the others; the last one appearing on the command line takes +effect. Since it is the default, the \-P option should be considered +to be in effect unless either \-H or \-L is specified. GNU .B find @@ -195,7 +195,7 @@ Turn warning messages on or off. These warnings apply only to the command line usage, not to any conditions that .B find might encounter when it searches directories. The default behaviour -corresponds to \-warn if standard input is a tty, and to -nowarn +corresponds to \-warn if standard input is a tty, and to \-nowarn otherwise. .IP \-xdev Don't descend directories on other filesystems. @@ -265,7 +265,7 @@ Like \-name, but the match is case insensitive. For example, the patterns `fo*' and `F??' match the file names `Foo', `FOO', `foo', `fOo', etc. In these patterns, unlike filename expansion by the shell, an initial '.' can be matched by '*'. That is, -.B find -name *bar +.B find \-name *bar will match the file `.foobar'. .IP "\-inum \fIn\fR" @@ -402,7 +402,7 @@ directory `src/emacs' and all files and directories under it, and print the names of the other files found, do something like this: .br .in +1i -find . \-wholename './src/emacs' -prune -o -print +find . \-wholename './src/emacs' \-prune \-o \-print .br .in -1i .IP "\-xtype \fIc\fR" @@ -430,7 +430,7 @@ of Both of these constructions might need to be escaped (with a `\e') or quoted to protect them from expansion by the shell. See the .B EXAMPLES -section for examples of the use of the `-exec' option. +section for examples of the use of the `\-exec' option. The command is executed in the starting directory. .IP "\-exec \fIcommand\fR +" @@ -466,7 +466,7 @@ seriously consider using the `\-print0' option instead of `\-print'. .IP \-print0 True; print the full file name on the standard output, followed by a -null character (instead of the newline character that `-print' uses). +null character (instead of the newline character that `\-print' uses). This allows file names that contain newlines or other types of white space to be correctly interpreted by programs that process the \fBfind\fR output. This option corresponds to the `\-0' option of @@ -540,7 +540,7 @@ second (00..61) .IP T time, 24-hour (hh:mm:ss) .IP + -Date and time, separated by '+', for example `2004-04-28+22:22:05'. +Date and time, separated by '+', for example `2004\-04\-28+22:22:05'. The time is given in the current timezone (which may be affected by setting the TZ environment variable). This is a GNU extension. .IP X @@ -645,7 +645,7 @@ File's user name, or numeric user ID if the user has no name. .IP %U File's numeric user ID. .IP %y -File's type (like in ls -l), U=unknown type (shouldn't happen) +File's type (like in ls \-l), U=unknown type (shouldn't happen) .IP %Y File's type (like %y), plus follow symlinks: L=loop, N=nonexistent .PP @@ -682,7 +682,7 @@ If \-depth is given, false; no effect. Exit immediately with return value zero. No child proceses will be left running, but no more paths specified on the command line will be processed. For example, -.B find /tmp/foo /tmp/bar -print -quit +.B find /tmp/foo /tmp/bar \-print \-quit will print only .BR /tmp/foo . @@ -757,25 +757,25 @@ below. .IP "Other predicates" The predicates -`-atime', -`-ctime', -`-depth', -`-group', -`-links', -`-mtime', -`-nogroup', -`-nouser', -`-perm', -`-print', -`-prune', -`-size', -`-user' and -`-xdev', +`\-atime', +`\-ctime', +`\-depth', +`\-group', +`\-links', +`\-mtime', +`\-nogroup', +`\-nouser', +`\-perm', +`\-print', +`\-prune', +`\-size', +`\-user' and +`\-xdev', are all supported. .P The POSIX standard specifies parentheses `(', `)', negation `!' and the -`and' and `or' operators (`-a', `-o'). +`and' and `or' operators (`\-a', `\-o'). .P All other options, predicates, expressions and so forth are extensions beyond the POSIX standard. Many of these extensions are not unique to @@ -829,30 +829,30 @@ If set to a non-empty string value, override the values of all the other internationalization variables. .IP LC_COLLATE The POSIX standard specifies that this variable affects the pattern -matching to be used for the `-name' option. GNU find uses the +matching to be used for the `\-name' option. GNU find uses the .BR fnmatch (3) library function, and so support for `LC_COLLATE' depends on the system library. .IP POSIX also specifies that the `LC_COLLATE' environment variable affects the interpretation of the user's response to the -query issued by `-ok', but this is not the case for GNU find. +query issued by `\-ok', but this is not the case for GNU find. .IP LC_CTYPE This variable affects the treatment of character classes used with -the `-name' option, if the system's +the `\-name' option, if the system's .BR fnmatch (3) library function supports this. It has no effect on the behaviour -of the `-ok' expression. +of the `\-ok' expression. .IP LC_MESSAGES Determines the locale to be used for internationalised messages. .IP NLSPATH Determines the location of the internationalisation message catalogues. .IP PATH Affects the directores which are searched to find the executables -invoked by `-exec' and `-ok'. +invoked by `\-exec' and `\-ok'. .SH "EXAMPLES" .nf -.B find /tmp -name core -type f -print | xargs /bin/rm -f +.B find /tmp \-name core \-type f \-print | xargs /bin/rm -f .fi Find files named @@ -862,7 +862,7 @@ in or below the directory and delete them. Note that this will work incorrectly if there are any filenames containing newlines, single or double quotes, or spaces. .P -.B find /tmp -name core -type f -print0 | xargs -0 /bin/rm -f +.B find /tmp \-name core \-type f \-print0 | xargs \-0 /bin/rm -f .fi Find files named @@ -874,14 +874,14 @@ directory names containing single or double quotes, spaces or newlines are correctly handled. The .B \-name test comes before the -.B -type +.B \-type test in order to avoid having to call .B stat(2) on every file. .P .nf -.B find . -type f -exec file '{}' \e\; +.B find . \-type f \-exec file '{}' \e\; .fi Runs `file' on every file in or below the current directory. Notice @@ -892,8 +892,8 @@ been used in that case also. .P .nf -.B find / \t( -perm +4000 -fprintf /root/suid.txt '%#m %u %p\en' ) , \e -.B \t\t( -size +100M -fprintf /root/big.txt '%-10s %p\en' ) +.B find / \t( \-perm +4000 \-fprintf /root/suid.txt '%#m %u %p\en' ) , \e +.B \t\t( \-size +100M \-fprintf /root/big.txt '%\-10s %p\en' ) .fi Traverse the filesystem just once, listing setuid files and @@ -941,6 +941,6 @@ http://savannah.gnu.org/bugs/?group=findutils. The reason for this is that you will then be able to track progress in fixing the problem. Other comments about \fBfind\fP(1) and about the findutils package in general can be sent to the -.I bug-findutils +.I bug\-findutils mailing list. To join the list, send email to -.IR bug-findutils-request@gnu.org . +.IR bug\-findutils\-request@gnu.org . diff --git a/xargs/xargs.1 b/xargs/xargs.1 index dbd4fbe..f2f310b 100644 --- a/xargs/xargs.1 +++ b/xargs/xargs.1 @@ -5,9 +5,9 @@ xargs \- build and execute command lines from standard input .B xargs [\-0prtx] [\-e[eof-str]] [\-i[replace-str]] [\-l[max-lines]] [\-n max-args] [\-s max-chars] [\-P max-procs] [\-\-null] [\-\-eof[=eof-str]] -[\-\-replace[=replace-str]] [\-\-max-lines[=max-lines]] [\-\-interactive] -[\-\-max-chars=max-chars] [\-\-verbose] [\-\-exit] [\-\-max-procs=max-procs] -[\-\-max-args=max-args] [\-\-no-run-if-empty] [\-\-arg-file=file] +[\-\-replace[=replace-str]] [\-\-max\-lines[=max-lines]] [\-\-interactive] +[\-\-max\-chars=max-chars] [\-\-verbose] [\-\-exit] [\-\-max\-procs=max-procs] +[\-\-max\-args=max-args] [\-\-no\-run\-if\-empty] [\-\-arg\-file=file] [\-\-version] [\-\-help] [command [initial-arguments]] .SH DESCRIPTION @@ -28,14 +28,14 @@ Because Unix filenames can contain blanks and newlines, this default behaviour is often problematic; filenames containing blanks and/or newlines are incorrectly processed by .BR xargs . -In these situations it is better to use the `-0' option, which +In these situations it is better to use the `\-0' option, which prevents such problems. When using this option you will need to ensure that the program which produces the input for .B xargs also uses a null character as a separator. If that program is GNU .B find -for example, the `-print0' option does this for you. +for example, the `\-print0' option does this for you. .P If any invocation of the command exits with a status of 255, .B xargs @@ -43,7 +43,7 @@ will stop immediately without reading any firther input. An error message is issued on stderr when this happens. .SS OPTIONS .TP -.I "\-\-arg-file=file, \-a file" +.I "\-\-arg\-file=file, \-a file" Read items from .I file instead of standard input. If you use this option, stdin remains @@ -80,13 +80,13 @@ If \fIreplace-str\fR is omitted, it defaults to "{}" (like for `find \-exec'). Implies \fI\-x\fP and \fI\-l 1\fP. .TP -.I "\-\-max-lines[=max-lines], -l[max-lines]" +.I "\-\-max\-lines[=max-lines], -l[max-lines]" Use at most \fImax-lines\fR nonblank input lines per command line; \fImax-lines\fR defaults to 1 if omitted. Trailing blanks cause an input line to be logically continued on the next input line. Implies \fI\-x\fR. .TP -.I "\-\-max-args=max-args, \-n max-args" +.I "\-\-max\-args=max-args, \-n max-args" Use at most \fImax-args\fR arguments per command line. Fewer than \fImax-args\fR arguments will be used if the size (see the \-s option) is exceeded, unless the \-x option is given, in which case \fBxargs\fR @@ -97,11 +97,11 @@ Prompt the user about whether to run each command line and read a line from the terminal. Only run the command line if the response starts with `y' or `Y'. Implies \fI\-t\fR. .TP -.I "\-\-no-run-if-empty, \-r" +.I "\-\-no\-run\-if\-empty, \-r" If the standard input does not contain any nonblanks, do not run the command. Normally, the command is run once even if there is no input. .TP -.I "\-\-max-chars=max-chars, \-s max-chars" +.I "\-\-max\-chars=max-chars, \-s max-chars" Use at most \fImax-chars\fR characters per command line, including the command and initial-arguments and the terminating nulls at the ends of the argument strings. The default is 131072 characters, not including @@ -124,14 +124,14 @@ and exit. .I "\-\-exit, \-x" Exit if the size (see the \fI\-s\fR option) is exceeded. .TP -.I "\-\-max-procs=max-procs, \-P max-procs" +.I "\-\-max\-procs=max-procs, \-P max-procs" Run up to \fImax-procs\fR processes at a time; the default is 1. If \fImax-procs\fR is 0, \fBxargs\fR will run as many processes as possible at a time. Use the \fI\-n\fR option with \fI\-P\fR; otherwise chances are that only one exec will be done. .SH "EXAMPLES" .nf -.B find /tmp -name core -type f -print | xargs /bin/rm -f +.B find /tmp \-name core \-type f \-print | xargs /bin/rm \-f .fi Find files named @@ -141,7 +141,7 @@ in or below the directory and delete them. Note that this will work incorrectly if there are any filenames containing newlines or spaces. .P -.B find /tmp -name core -type f -print0 | xargs -0 /bin/rm -f +.B find /tmp \-name core \-type f \-print0 | xargs \-0 /bin/rm \-f .fi Find files named @@ -152,7 +152,7 @@ and delete them, processing filenames in such a way that file or directory names containing spaces or newlines are correctly handled. .P .nf -.B cut -d: -f1 < /etc/passwd | sort | xargs echo +.B cut \-d: \-f1 < /etc/passwd | sort | xargs echo .fi Generates a compact listing of all the users on the system. @@ -191,7 +191,7 @@ uses, and you can also use an extra invocation of to ensure that very long lines do not occur. For example: .P -.B echo * | xargs -s 50000 echo | xargs -i -s 100000 rm '{}' +.B echo ./* | xargs \-s 50000 echo | xargs \-i \-s 100000 rm '{}' .P Here, the first invocation of .B xargs @@ -211,6 +211,6 @@ http://savannah.gnu.org/bugs/?group=findutils. The reason for this is that you will then be able to track progress in fixing the problem. Other comments about \fBxargs\fP(1) and about the findutils package in general can be sent to the -.I bug-findutils +.I bug\-findutils mailing list. To join the list, send email to -.IR bug-findutils-request@gnu.org . +.IR bug\-findutils\-request@gnu.org . -- 2.11.4.GIT