Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

shrinkfile(1) [redhat man page]

SHRINKFILE(1)						      General Commands Manual						     SHRINKFILE(1)

NAME
shrinkfile - shrink a file on a line boundary SYNOPSIS
shrinkfile [ -n ] [ -m maxsize ] [ -s size ] [ -v ] file... DESCRIPTION
The shrinkfile program shrinks files to a given size if the size is larger than maxsize, preserving the data at the end of the file. Truncation is performed on line boundaries, where a line is a series of bytes ending with a newline, . There is no line length restriction and files may contain any binary data. Temporary files are created in the <pathtmp in inn.conf> directory. The ``TMPDIR'' environment variable may be used to specify a different directory. A newline will be added to any non-empty file that does not end with a newline. The maximum file size will not be exceeded by this addi- tion. OPTIONS
-s By default, size is assume to be zero and files are truncated to zero bytes. By default, maxsize is the same as size. If maxsize is less than size, maxsize is reset to size. The ``-s'' flag may be used to change the truncation size. Because the program trun- cates only on line boundaries, the final size may be smaller then the specified truncation size. The size and maxsize parameter may end with a ``k'', ``m'', or ``g'', indicating kilobyte (1024), megabyte (1048576) or gigabyte (1073741824) lengths. Uppercase let- ters are also allowed. The maximum file size is 2147483647 bytes. -v If the ``-v'' flag is used, then shrinkfile will print a status line if a file was shrunk. -n If the ``-n'' flag is used, then shrinkfile will exit 0 if any file is larger than maxsize and exit 1 otherwise. No files will be altered. EXAMPLES
Example usage: shrinkfile -s 4m curds shrinkfile -s 1g -v whey shrinkfile -s 500k -m 4m -v curds whey if shrinkfile -n -s 100m whey; then echo whey is way too big; fi HISTORY
Written by Landon Curt Noll <chongo@toad.com> and Rich $alz <rsalz@uunet.uu.net> for InterNetNews. SEE ALSO
inn.conf(5) SHRINKFILE(1)

Check Out this Related Man Page

uucpsend(8)							Programmer's Manual						       uucpsend(8)

NAME
uucpsend - Alternative frontend for uucp batching SYNOPSYS
uucpsend [ -c config ] [ -f appendix ] sitename [ sitename ... ] This program offers a comfortable way to do news batching with the INN news system. Like the name assumes it is used for sites that are connected via UUCP. The idea behind the mechanism is taken from the nntpsend program which is already included in distributions of INN. The program does not do the batching itself. Instead it lets commonly used tools do the work. However it controls their behaviour. Using uucpsend you can define detailed how batching for each site shall take place in an easy fashion. In the file uucpsend.ctl(5) for each site your server feeds you can specify the size of batches, the maximal disk space that may be used by the uucp site, the header that should be written in the batch (e.g. funbatch, cunbatch, gunbatch etc.), the compression program to use as well as additional arguments passed to uux(8). The sitename should be the name of the site as specified in the newsfeeds(5) file. If no sitenames are passed to the program it will loop over all sites that described in the configuration file. This makes it easy to maintain sets of sites that are to be batched one after the other - contrary to batching through the whole day. A batcher(8) is launched for sites with queued news. Output is sent to the file /var/log/news/uucpsend.log. In order to keep from over- whelming the local system, uucpsend waits five seconds before the next site is fed. Uucpsend expects that the batchfile for a site is named /var/spool/news/out.going/sitename. To prevent batchfile corruption, shlock(1) is used to ``lock'' these files. It is useful to have cron(8) invoke uucpsend. When no sites are given on the command line, any flags given on the command completely describe how batcher operate. When no sites are given on the command line, then the information found in uucpsend.ctl becomes the default flags for that sites. OPTIONS
-f config Using this parameter you are able to specify a file different to PATH_UUCPCTL which defaults to /etc/news/uucpsend.ctl. -f appendix With the parameter ``-f'' you may specify another uucpsend.ctl(5) file. Information with regard to also given sitenames are read from the uucpsend.ctl-file. Please keep in mind that all default values are still read from the main uucpsend.ctl file. This fea- ture has been added to let big sites easily specify a different batching behaviour. HISTORY
Written by Martin Schulze <joey@infodrom.org>, derived mostly from nntpsend(8) by Landon Curt Noll <chongo@toad.com> and Rich $alz <rsalz@uunet.uu.net> for InterNetNews. SEE ALSO
innxmit(1), newsfeeds(5), uucpsend.ctl(5), nntppsend(8), nntppsend.ctl(5), shrinkfile(1). Infodrom 21 November 2001 uucpsend(8)
Man Page