coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 8/8] doc: document split's new --filter=CMD option


From: Pádraig Brady
Subject: Re: [PATCH 8/8] doc: document split's new --filter=CMD option
Date: Sat, 30 Apr 2011 17:21:09 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

On 30/04/11 14:31, Jim Meyering wrote:
> From: Jim Meyering <address@hidden>
> 
> * doc/coreutils.texi (split invocation): Describe --filter=CMD.
> ---
>  doc/coreutils.texi |   24 ++++++++++++++++++++++--
>  1 files changed, 22 insertions(+), 2 deletions(-)
> 
> diff --git a/doc/coreutils.texi b/doc/coreutils.texi
> index d2377f4..88e363b 100644
> --- a/doc/coreutils.texi
> +++ b/doc/coreutils.texi
> @@ -2992,8 +2992,8 @@ split invocation
>  Put @var{lines} lines of @var{input} into each output file.
> 
>  For compatibility @command{split} also supports an obsolete
> -option syntax @option{-@var{lines}}.  New scripts should use @option{-l
> -@var{lines}} instead.
> +option syntax @option{-@var{lines}}.  New scripts should use
> +@option{-l @var{lines}} instead.
> 
>  @item -b @var{size}
>  @itemx --bytes=@var{size}
> @@ -3011,6 +3011,26 @@ split invocation
>  @var{size} bytes are broken into multiple files.
>  @var{size} has the same format as for the @option{--bytes} option.
> 
> +@itemx --filter=@var{command}
> +@opindex --filter
> +With this option, rather than simply writing to each output file,
> +@command{split} writes through a pipe to the specified shell @var{command}

s/@command{split} writes/write/

> +for each output file.
> +@var{command} may use the $FILE environment variable, which is set
> +to a different output file name for each invocation of the command.
> +For example, imagine that you have a 1TiB compressed file
> +that, if uncompressed, would be too large to reside on disk,
> +yet you must split it into individually-compressed pieces
> +of a more manageable size.
> +To do that, you might run this command:
> +
> +@example
> +xz -dc BIG.xz big- | split -b200G --filter='xz > $FILE.xz'

xz -dc BIG.xz | split -b20G --filter='xz > $FILE.xz' - big-

> +@end example
> +
> +Assuming a 10:1 compression ratio, that would create about fifty 20GiB files
> +with names @file{big-xaa.xz}, @file{big-xab.xz}, @file{big-xac.xz}, etc.
> +
>  @item -n @var{chunks}
>  @itemx --number=@var{chunks}
>  @opindex -n




reply via email to

[Prev in Thread] Current Thread [Next in Thread]