|
NAMEshrinkfile - Shrink files on line boundariesSYNOPSISshrinkfile [-nv] [-m maxsize] [-s size] file [file ...]DESCRIPTIONThe shrinkfile program shrinks files to at most a given size when their 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 ("\n"). There is no line length restriction and files may contain any binary data.If the first line is longer than the absolute value of size, the file will be truncated to zero length. The maximum file size shrinkfile can handle is 2,147,483,647 bytes. Temporary files are created in the pathtmp directory as set in inn.conf. 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, if naturally the resulting file size does not exceed size by this addition. This program is currently used by only nntpsend(8). OPTIONS
EXAMPLESExample 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 The first command shrinks curds to 4 MB if bigger than this size. The second command shrinks whey to 1 GB and outputs a log line if the file is bigger than this size. The third command shrinks both curds and whey to 500 kB if bigger than 4 MB, and outputs a log line for the files it has shrunk. The fourth command just prints a sentence if "whey" is bigger than 100 MB, without shrinking it. HISTORYWritten by Landon Curt Noll <chongo@toad.com> and Rich $alz <rsalz@uunet.uu.net> for InterNetNews. Rewritten into POD by Julien Elie.SEE ALSOnntpsend(8).
Visit the GSP FreeBSD Man Page Interface. |