Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

shrinkfile(1) [suse 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. Trun- cation is performed on line boundaries, where a line is a series of bytes ending with a newline, `` ''. There is no line length restric- tion 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 assumed 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

MAILSOUND(1)						      General Commands Manual						      MAILSOUND(1)

NAME
mailsound - play sounds when mail is received SYNOPSIS
mailsound [-hszZvrd] soundname ... DESCRIPTION
mailsound allows a user to play sounds when new mail arrives. It reads a mail message from stdin and uses Mark Boyns' rplay library to play sounds. The sound that is played is determined by a configuration file in the user's home directory called .mailsounds. Each line in this file has two parts. The first part is a regular expression which will be used to match the from address from a mail message. The second part describes what to do when a match is found. The options in the second part are identical to the options on the command line. The command line options will set defaults which will be used if they are not specified in the configuration file. If not specified, the mailsound program will use the following defaults: default sound: youvegotmail.au default volume: 127 (50%) If the mail address does not match any of the regular expressions in the .mailsounds file, no sound will be played. OPTIONS
-h hostname:[hostname...] Play sounds on all of these hosts. -z <minsize>:<minvolume>,<maxsize>:<maxvolume> The volume the sound will be played at will be determined by the size of the mail message. The sound for a message with a size smaller than <minsize> will be played at volume <minvolume>. The sound for a message with a size larger than <maxsize> will be played at volume <maxvolume>. The sound for a message with a size between <minsize> and <maxsize> will be played at a volume which is a linear interpolation between <minvolume> and <maxvolume>. -Z <minsize>,<maxsize> The sound to be played is determined by the size of the mail message. If the message is smaller than <minsize>, the first listed sound is played. If the message is larger than <maxsize>, the last listed sound is played. If the message size is between those two values, the appropriate sound from the list is played. -s <subject re> The regular expression supplied will have to match the subject of the message. If this option is not there, the subject of the mes- sage is completely ignored. Be careful that the regular expression does not contain spaces. Due to laziness of the author of this program, this will hopelessly confuse the program. -v <int> Set the volume at which the sound should be played. The range is 0-255. -r Pick a sound at random from the list of sounds provided. -d Turn on debugging. This will produce diagnostic output to stdout. EXAMPLE
The following could appear in the .forward file in your home directory: (This assumes that your username is pickard) pickard, |"/usr/local/bin/mailsound" Here is a sample $HOME/.mailsounds file: Andrew.* -r Passing_Train riot arrp flinstones root.* out! daemon.* -v 220 sci_fi_fun MAILER.* -S 1000,10000 cuckoo pig Oomph *. pigs FILES
$HOME/.mailsounds SEE ALSO
rplay.conf(5), rplayd(1) AUTHOR
This program was written by Andrew Scherpbier at San Diego State University. He can be reached by E-mail as follows: Andrew@SDSU.Edu The mailsound program makes use of Mark Boyns' rplay package which can play multiple sounds on remote machines. He can be reached by E-mail as follows: boyns@sdsu.edu BUGS
The code does very little error checking. No range checking on any of the values is done. 11 August 1993 MAILSOUND(1)
Man Page