mirror of
https://https.git.savannah.gnu.org/git/findutils.git
synced 2026-01-26 15:39:06 +00:00
doc: use option -L instead of deprecated -l in xargs examples
* doc/find.texi: Change the deprecated -l option to -L 1 in various xargs(1) examples. * NEWS (Documentation Changes): Document the change. Reported by Sebastian Carlos in Fixes https://savannah.gnu.org/bugs/?64480
This commit is contained in:
parent
d76d0f5668
commit
ad4e2bdde0
3
NEWS
3
NEWS
@ -36,6 +36,9 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout)
|
||||
|
||||
The xargs documentation now describes the double dash "--" option delimiter.
|
||||
|
||||
The xargs examples in the Texinfo manual now use the -L option instead of
|
||||
the deprecated -l option. [#64480]
|
||||
|
||||
|
||||
* Noteworthy changes in release 4.9.0 (2022-02-22) [stable]
|
||||
|
||||
|
||||
@ -2753,7 +2753,7 @@ work that it takes significant time to run, even on a single image.
|
||||
You could run:
|
||||
|
||||
@example
|
||||
find originals -name '*.jpg' | xargs -l makeallsizes
|
||||
find originals -name '*.jpg' | xargs -L 1 makeallsizes
|
||||
@end example
|
||||
|
||||
This will run @code{makeallsizes @var{filename}} once for each @code{.jpg}
|
||||
@ -2762,7 +2762,7 @@ two central processors, this script will only keep one of them busy.
|
||||
Instead, you could probably finish in about half the time by running:
|
||||
|
||||
@example
|
||||
find originals -name '*.jpg' | xargs -l -P 2 makeallsizes
|
||||
find originals -name '*.jpg' | xargs -L 1 -P 2 makeallsizes
|
||||
@end example
|
||||
|
||||
@code{xargs} will run the first two commands in parallel, and then
|
||||
@ -2803,7 +2803,7 @@ If you send it the signal @code{SIGUSR1}, it will run one more command
|
||||
in parallel. For example:
|
||||
|
||||
@example
|
||||
shell$ xargs <allimages -l -P 4 makeallsizes &
|
||||
shell$ xargs <allimages -L 1 -P 4 makeallsizes &
|
||||
[4] 27643
|
||||
... at some later point ...
|
||||
shell$ kill -USR2 27643
|
||||
@ -2863,7 +2863,7 @@ names read from the input. Also, unquoted blanks do not terminate
|
||||
arguments; instead, the input is split at newlines only. For the
|
||||
@samp{-i} option, if @var{replace-str} is omitted for @samp{--replace}
|
||||
or @samp{-i}, it defaults to @samp{@{@}} (like for @samp{find -exec}).
|
||||
Implies @samp{-x} and @samp{-l 1}. @samp{-i} is deprecated in favour
|
||||
Implies @samp{-x} and @samp{-L 1}. @samp{-i} is deprecated in favour
|
||||
of @samp{-I}. As an example, to sort each file in the @file{bills}
|
||||
directory, leaving the output in that file name with @file{.sorted}
|
||||
appended, you could do:
|
||||
@ -3934,7 +3934,7 @@ names read from standard input. Also, unquoted blanks do not
|
||||
terminate arguments; instead, the input is split at newlines only. If
|
||||
@var{replace-str} is omitted (omitting it is allowed only for
|
||||
@samp{-i}), it defaults to @samp{@{@}} (like for @samp{find -exec}).
|
||||
Implies @samp{-x} and @samp{-l 1}. The @samp{-i} option is deprecated
|
||||
Implies @samp{-x} and @samp{-L 1}. The @samp{-i} option is deprecated
|
||||
in favour of the @samp{-I} option.
|
||||
|
||||
@item -L @var{max-lines}
|
||||
@ -4029,7 +4029,7 @@ reset the value of the offending option (given before) to its default value.
|
||||
Additionally, @code{xargs} will issue a warning diagnostic on @file{stderr}.
|
||||
|
||||
@example
|
||||
$ seq 4 | xargs -l2 -n3
|
||||
$ seq 4 | xargs -L2 -n3
|
||||
xargs: warning: options --max-lines and --max-args/-n are \
|
||||
mutually exclusive, ignoring previous --max-lines value
|
||||
1 2 3
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user