4 shrinkfile \- shrink a file on a line boundary
23 program shrinks files to a given
25 if the size is larger than
27 preserving the data at the end of the file.
28 Truncation is performed on line boundaries, where a line is a series
29 of bytes ending with a newline, ``\en''.
30 There is no line length restriction and files may contain any binary data.
32 Temporary files are created in the
33 .I <pathtmp in inn.conf>
35 The ``TMPDIR'' environment variable may be used to specify a
38 A newline will be added to any non-empty file that does not end with a newline.
39 The maximum file size will not be exceeded by this addition.
45 is assumed to be zero and files are truncated to zero bytes.
57 The ``\fB\-s\fP'' flag may be used to change the truncation size.
58 Because the program truncates only on line boundaries, the final size
59 may be smaller then the specified truncation size.
64 parameter may end with a ``k'', ``m'', or ``g'', indicating
65 kilobyte (1024), megabyte (1048576) or gigabyte (1073741824) lengths.
66 Uppercase letters are also allowed.
67 The maximum file size is 2147483647 bytes.
70 If the ``\fB\-v\fP'' flag is used, then
72 will print a status line if a file was shrunk.
75 If the ``\fB\-n\fP'' flag is used, then
77 will exit 0 if any file is larger than
80 No files will be altered.
87 shrinkfile -s 4m curds
88 shrinkfile -s 1g -v whey
89 shrinkfile -s 500k -m 4m -v curds whey
90 if shrinkfile -n -s 100m whey; then echo whey is way too big; fi
95 Written by Landon Curt Noll <chongo@toad.com> and Rich $alz
96 <rsalz@uunet.uu.net> for InterNetNews.
98 This is revision \\$3, dated \\$4.