Scripts Category UNIX : System_administration

newsyslog is a highly configurable script for maintaining and archiving sets of log files. It archives log files based on size, date or interval, and can optionally compress log files with gzip or bzip2.

Prints advanced statistics on disk space usage. Useful for users/administrators not satisfied with traditional UNIX utilities such as du or ls. More info is available by executing LL.pl -h or LL.pl -m, displaying a help and a manual page respectively.

1. INTRODUCTIONspf-milter is a Milter, which works with Sendmail 8.12 and up, and providesan SPF-compliant extension to the SMTP communication between your MTA andconnecting clients. See http://spf.pobox.com/ for details about SPF itself.spf-milter is written entirely in Perl, and uses the native threaded Miltermodel. spf-milter is licensed under GPL.2. PREREQUISITESspf-milter requires:1): Perl 5.8.x, or higher.2): P...

'shroud' is a script that will transform perl code intovirtually unreadable text, while retaining the full functionality of that code. It is used to shroud thesource code of commercial perl programs. More information is available from the POD documentation within the script and from this URL: http://www.craic.com/resources/tech_notes/tech_note_2.html

This program is a full implementation of rfc 1725,with an adjustment made to unsplit header lines so thatNetscape Communicator will not drop the connection whenit gets a message-id that is too long.All configuration is done within the code, which meansthat it is open to being tied to the database(s) of yourchoice.

This program may be used for sending email messages for CVS repositoryactivity. Messages can be sent for every repository change, or for everycommit. In the latter case, a list of all the files affected may be assembledand listed or attached to the single message.

This program may be used for sending email messages for CVS repositoryactivity. Messages can be sent for every repository change, or for everycommit. In the latter case, a list of all the files affected may be assembledand listed or attached to the single message.

Prints to STDOUT a sorted list of items followed by a comma then followedby the number of instances of that item. In fairness it is only a wrappedimplementation of a counter using a simple hash.Take this file C<example.txt> as an example:

Converts a MKS based source repository to a CVS based respositoryand converts MKS's notion of "versioning" (of each Project [.pj])to obvious matching tags containing the same version numbers.Contains some self-extracting helper shell-scripts.

With this script you can check if a text file is ofa specific type and convert it to a different type.Special feature is the ability of fixing files that werebroken by wrong ftp upload and download mode (ascii/bin).Supported file types are dos, mac, unix and broken.It also runs under DOS.

With this script you can check if a text file is ofa specific type and convert it to a different type.Special feature is the ability of fixing files that werebroken by wrong ftp upload and download mode (ascii/bin).Supported file types are dos, mac, unix and broken.It also runs under DOS.(unix2dos dos2unix fixeol newline linebreak)

sudoscriptdcreates a named pipe (FIFO) in a spool area, and hangs around waitingfor someone to write to it. When output is received, it is timestampedand placed in a log file in /var/log. The size of the data received ismonitored. When the size of the log plus the size of the data exceed2MB, the log is rotated and gzipped in a subprocess. At most 10 logsare kept hanging around. Multiple processes can write to the fifo at t...

Sudo is a tool used for running programs with root privilege. Itsmajor benefit is the audit trail it provides, as it logs eachinvocation with the command name, its arguments and the user who ranit. Because this audit trail is lost if a user runs a shell (e.g. bashor csh) with sudo, many sites restrict sudo to not allow suchusage. Since this can cause problems, (see L<SUDO AND SHELLS>) manyusers prefer to retain the root pas...

Test or wait for an event using boolean expressions on top of alanguage of tests like grepping in ps-output and logs, pinging hostsor waiting for events like 'not-recently-changed' or 'networkinterface N is idle'.

Produce some simple passwords, suitable for use on low-value websites. These passwords are not cryptographically secure, so do notuse them on high security sites (use a fips-181 password generator,instead).

Produce some simple passwords, suitable for use on low-value websites. These passwords are not cryptographically secure, so do notuse them on high security sites (use a fips-181 password generator,instead).

This script is intended for dumping CXFS filesystems using a jukebox(tape robot)It does all the job of loading tapes with the stacker (the roboticscontrol program), relocating the metadataserver for the CXFS filesytems,launching the xfsdump utility, rewinding and ejecting tape and unloading it withthe stacker again. If a xfsdump needs more than 1 tape, it is able to changethe tape and span the dump to the next tape.The scri...

This is a general script for many types of backup jobs. You can use it to configure different types of backups, which can run togetheror independently of each other. It also formats a nice report for each backup job.

This script scans the current mail log and several recentmail log archives, and searches for messages sent to or froma particular address. It counts them up and mails a reportwith an inbound count and an outbound count.

This is a par <http://www.perl.com/language/ppt/src/par/index.html>archive. You may extract it by running it through perl as perl bcrond-0.82.paror with unpar (at the same URI).This archive contains a perl clone of Vixie cron, with several enhancements.It should be cross-platform compatible, and is known to work under Windows 9x,Linux, and SunOS/Solaris.

rsc executes a (Perl!-)Script on another host. Neither this target script,nor rsc or parts of it, nor input or output files have to be locatedon the target machine.There's no need to prepare the target system in any special way. No specialdeamon has to run there, only perl 5.005 or higher with a few modules installedand an rsh deamon are required. Additionally, this remote perl installation needsinstallations of t...

This small script creates and uses shortcuts for launching SSH sessions. It's a useful toolwhen you have a lot of systems to manage.This program is meant to be executed through a symlink to a hard link. The hard link file iscalled a C<parameter file>; the symlink is referred to as the C<shortcut>. If you wish,the hard link may also serve as the shortcut, obviating the step of creating a symlink.The C<parameter file> is cre...

quotadm is a user quota reporting tool. It can be used to get a table of users containing their quotausage, threshold limit, threshold usage etc. quotadm can also be used to send e-mail warning messagesto the users' whose quota has reached near or over quota threshold.

pop3dele is a simple script that connects to a POP3 server anddeletes the indicated messages, by message number. It acceptsmessage numbers on the command line, or through STDIN.You have some flexibility in the message-ids that are accepted.The keywords "all" will delete all messages on a POP3 account, butthis will only work if this is the only message ID argument provided.Message ID numbers can be given in ranges as well, l...

pop3list is part of the POP3Utils package, and is used toprogramatically list the contents of a POP3 account. Itaccepts a bunch of nifty input that allows you to change it'sbehavior. It's really quite a cool idea, IMHO.

pop3retr is a simple script that connects to a POP3 server andretrieves the indicated messages, by message number. It acceptsmessage numbers on the command line, or through STDIN.This functions very simillarly to L<pop3dele>, so refer to thatmanpage for more details.

Export/Import between DB_File and SDBM_Filefrom Windows and Unix platformsSDBM_Files can be ftp'ed across Unix/Windowsplatforms and work without a hitch. (pag anddir files). DB_Files can't be ftp'ed acrossplatform. (something to do with edian)I like to use DB_File instead of SDBM_FileThis util will export a DB_File to SDBM_Filesfor you to ftp. Then you can import thefiles (after ftping) by coverting to DB_Fileat destina...

Export/Import between DB_File and SDBM_Filefrom Windows and Unix platformsSDBM_Files can be ftp'ed across Unix/Windowsplatforms and work without a hitch. (pag anddir files). DB_Files can't be ftp'ed acrossplatform. (something to do with edian)I like to use DB_File instead of SDBM_FileThis util will export a DB_File to SDBM_Filesfor you to ftp. Then you can import thefiles (after ftping) by coverting to DB_Fileat destina...

Given entries from your httpd access logs, this script will return a list of search terms that users used to find your site. The script doesn't attempt to parse the log entries at all, it just looks for something in the string thatresembles a referer URL from a search engine. Obviously, your web server mustbe configured to log the referer URL in your access logs or this script wont' work.Here are a couple examples of how you...

The following script is designed to read the Native Logfile Format(NLF) and generateoutputs in different graphical forms. logAnalyzer-1.0.ptk written in perl/Tk can find its applications in Analyzing huge logfiles generated by servers, building information database to sort the internet usage depending on various requirements, gaining more control over the security of the proxy servers by restricting users as per their requiremen...

bmonitor is a perl script to monitor LSF jobs. Every minute the script show for each jobs useful informations: CPU : number of processors asked par the users MEM : memory used by the job (MB) SWAP : swap used by the job (MB) CPUTIM : cpu time of the job (hh:mm) JOB : number identification of the job USER : user login STAT : status of the job (PEND, PSUSP, USUSP, SSUSP, RUN) QUEUE : name of t...

bmonitor is a perl script to monitor LSF jobs. Every minute the script show for each jobs useful informations: CPU : number of processors asked par the users MEM : memory used by the job (MB) SWAP : swap used by the job (MB) CPUTIM : cpu time of the job (hh:mm) JOB : number identification of the job USER : user login STAT : status of the job (PEND, PSUSP, USUSP, SSUSP, RUN) QUEUE : name of t...

Diff format converted (unified <-> context).This script takes context or unified diff, and produces a diff,that would be created by C<diff> program if it would be run with command-lineoptions passed to this script. C<-c>, C<-u>, C<-b>, C<-w>, C<-t> options aresupported. E.g. convert to unified diff with tabs expanded: rediff -ut <old_diff >new_diff

Diff format converted (unified <-> context).This script takes context or unified diff, and produces a diff,that would be created by C<diff> program if it would be run with command-lineoptions passed to this script. C<-c>, C<-u>, C<-b>, C<-w>, C<-t> options aresupported. Non-diff C<-r> option can be used to reverse the diff.E.g. convert to unified diff with tabs expanded: rediff -ut <old_diff >new_diff

Automatically generate an RPM software package from a list of files.make_rpm.pl builds the RPM in a very clean and configurable fashion.(Making RPMs "the simple way" in a one-line command.)make_rpm.pl generates and then deletes temporaryfiles (and binary root directory tree) to build an RPM with.It is designed to work cleanly and independently from pre-existingdirectory trees such as /usr/src/redhat/*.

Rotate log files and optionally send a signal (default is HUP) to thespecified process ID, then optionally compress the newly rotated logfile(s). As many different log files may be specified on the command lineas desired.Command line options: