summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-06-26 10:33:09 +0000
committerJim Meyering <jim@meyering.net>2006-06-26 10:33:09 +0000
commit9cabe37ac9a127f76e1f414ed8c297e3bf32feaa (patch)
tree63dbbc7eebe415b16ab87182199119c664e0bcfe /doc
parent5cd6710f080c5763964e1936038f00997c8434f3 (diff)
downloadcoreutils-9cabe37ac9a127f76e1f414ed8c297e3bf32feaa.tar.xz
* coreutils.texi (wc invocation): Document new --files0-from option.
Diffstat (limited to 'doc')
-rw-r--r--doc/ChangeLog4
-rw-r--r--doc/coreutils.texi22
2 files changed, 26 insertions, 0 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index d3b8bbbbb..01cc164b7 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2006-06-26 Jim Meyering <jim@meyering.net>
+
+ * coreutils.texi (wc invocation): Document new --files0-from option.
+
2006-06-20 Eric Blake <ebb9@byu.net>
* coreutils.texi (sleep invocation): Document that accepting
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 9fee7fd7e..67639cea3 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -2961,6 +2961,28 @@ Print only the newline counts.
@opindex --max-line-length
Print only the maximum line lengths.
+@itemx --files0-from=@var{FILE}
+@opindex --files0-from=@var{FILE}
+@cindex including files from @command{du}
+Rather than processing files named on the command line, process those
+named in file @var{FILE}; each name is terminated by a null byte.
+This is useful when
+the list of file names is so long that it may exceed a command line
+length limitation.
+In such cases, running @command{wc} via @command{xargs} is undesirable
+because it splits the list into pieces and makes @command{wc} print a
+total for each sublist rather than for the entire list.
+One way to produce a list of null-byte-terminated file names is with @sc{gnu}
+@command{find}, using its @option{-print0} predicate. For example, to find
+the length of the longest line in any @file{.c} or @file{.h} file in the
+current hierarchy, do this:
+
+@example
+find . -name '*.[ch]' -print0 | ./wc -L --files=- | tail -n1
+@end example
+
+Do not specify any @var{FILE} on the command line when using this option.
+
@end table
@exitstatus