Fruit's git repositories dog / master dog.1
master

Tree @master (Download .tar.gz)

dog.1 @masterraw · history · blame

.TH CAT 1 "GNU Text Utilities" "FRUIT" \" -*- nroff -*-
.SH NAME
dog \- buffer input files or standard input and write it to stdout
.SH SYNOPSIS
.B dog
[\-prVv] [\-n n] [\-s n] [\-\-prealloc] [\-\-realloc] [\-\-version]
[\-\-verbose] [\-\-number=n] [\-\-size=n] [file...]
.SH DESCRIPTION
This manual page
documents
.BR dog .
.B dog
writes the contents of each given file, or the standard input if
none are given, to the standard output. It reads from stdin and
writes to stdout using nonblocking I/O and keeps a number of blocks
in memory for buffering.
.PP
Possible uses include buffering of audio and video data, streams to
CD burners and speeding up network connections by ensuring that data
is always available for sending.
.SH OPTIONS
.TP
.I "\-V, \-\-version"
Print version information on standard output then exit.
.TP
.I "\-v, \-\-verbose"
Display some cryptic numbers on stderr: index of block to be read, index of block being written, status of block being read, status of block being written, distance between blocks. Status letters include:
.RS
.IP u
Unused block. This block is free to be filled with data.
.IP r
This block is filled, and is either waiting to be written or being written.
.IP q
This block signifies the end of all input files. Once it is encountered for writing,
.B dog
exits.
.IP m
.B dog
is waiting for memory to become available.
.RE
.TP
.I "\-r, \-\-realloc"
Deallocate memory when data is written and if the block is only partially
filled with data, truncate the buffer to that amount.
.B dog
only tries to read() once per block, hence it may save a significant amount
of memory in certain circumstances, for example when reading from a network
connection.
.TP
.I "\-p, \-\-prealloc"
Allocate all buffers before reading or writing anything. If speed is very
important, or you want to make sure enough memory is available beforehand,
this option may come in handy.
.TP
.I "\-s, \-\-size n"
Try to read blocks of n bytes at a time. When reading from a large file it
is often possible to read large chunks at once. Increasing this value to
values above 65536 usually yields undesirable or no effect. Defaults to
4096 bytes.
.TP
.I "\-n, \-\-number n"
Never keep more than n blocks of data in memory. Defaults to 1024.
.SH AUTHOR
.B dog
is written and copyright (C) 1998,1999 Wessel Dankers <wsl@fruit.warande.net>
.PP
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.