Skip to content

rgrjr/scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

   This package contains a collection of scripts intended to make a
GNU/Linux sysadmin's life easier.  They are all available under an
open-source license (Perl for the Perl scripts and GPLv2 for everything
else), and divided among a number of categories:

Backup hacks:

   Most of these are described in context on my Web site on the
http://www.rgrjr.com/linux/backup.html page.

   * backup.pl -- Create and verify a dar backup.

   * vacuum.pl -- Copy and verify named backup files over the network.

   * cd-dump.pl -- Dump the contents of the ./to-write/ directory to a
new session on a (possibly multisession) DVD-R or CDROM.

   * show-backups.pl -- Produce a sorted listing of backup files
generated by backup.pl.

   * clean-backups.pl -- Delete older daily backups in order to keep a
minimum amount of free disk space.

   * backup-dbs.pl -- Backup databases defined by configuration files.

Version control hacks:

   When CVS was really the only free VCS option, and because "cvs log"
output was in terms of files, I wrote a the first of these to
reconstruct the implicit changesets and present them chronologically
(hence the name).  Then it became an experiment in comparing languages,
with Python, Ruby, and C# versions, which were subsequently extended to
handle "svn log --xml --verbose" output as well.  Only vc-chrono-log.pl
has been updated to handle "git log", though.

   * cvs-chrono-log.pl -- Converts "cvs log" format into a chronological
recounting of changes (greatly compressing the output along the way).

   * svn-chrono-log.pl -- Converts "svn log --xml" format into a
chronological recounting of changes.

   * svn-dump.pl -- Create Subversion repository dump files, suitable
for incorporating into incremental file backups.

   * vc-chrono-log.pl -- Converts "git log", "svn log --xml", or "cvs
log" output into a chronological recounting of changes.  Used by my
Emacs hacks for browsing project history.

   * vc-chrono-log.rb -- Converts either "svn log --xml" or "cvs log"
output into a chronological recounting of changes (Ruby implementation).

General sysadmin hacks:

   * check-dates.pl -- Find the next ten transitions between standard
time and daylight savings time in the current locale.

   * check-passwd.pl -- Find duplicates by name or ID in /etc/passwd or
/etc/group.

   * extract-djbdns-log.pl -- Produce a human-readable extract of djbdns
queries.

   * find-net-mounts.pl -- Extract "noauto" network mounts on our
network from a file in /etc/fstab format.

   * install.pl -- Installation script that copies only if the file has
been changed since the last installation (so that the file dates still
mean something).  Also can create numbered backups, and do "diff -u"
instead of installing.

   * substitute-config.pl -- Apply changes in a delta configuration file
to an input configuration file.

Web hacks:

   * make-popular-pages.pl -- given a Web log (Squid or standard
format), summarize the ten most popular pages.

   * page-hits.pl -- given a Web log (standard format), summarize the
hits in various ways.

   * page-rankings.pl -- given a series of log files, generates a
period-by-period table of hits.  This is very site-specific.

Mail system hacks:

   * all-correspondents.pl -- extract all recipients from an mbox file.

   * decode-message.pl -- Hack to decode Postfix messages as stored in a
queue.

   * mbox2maildir.pl -- convert a BSD mbox file (the default Unix
format) to Maildir.

   * mbox-grep.pl -- search for regexps in mbox files.

   * qmail-deliver.pl (in email/qmail-deliver.pl) -- deliver a message
the way that qmail-local does, with extra hacks for whitelisting and
blacklisting.

Other stuff:

   * firewall -- Firewall script for /etc/init.d from when I was using
my GNU/Linux system as a firewall/router from 1999 until our cable modem
usurped all of that in 2013.  It is no longer maintained and I keep it
around only for historical reference.  (At work I maintained a similar
firewall/router system through late 2020.)

   * html-diff.pl -- Make sense of unidiffs of HTML by splitting
mismatched lines into tokens and then consolidating stretches of
matching tokens and text, and reporting only the unmatched tokens.

   * paranoid -- Early boot firewall script for /etc/init.d; see the
"firewall" script above.

   * sdiff.pl -- Run diff on two files, either of which may be remote,
fetched via scp.

   * split-discord-html.pl -- Split an HTML Discord direct messaging
conversation into smaller chunks, so that it doesn't overwhelm the
browser.

   * week-avg.pl -- Given a tab-delimited table of daily dates and
numbers, produce a corresponding table of weekly averages.

   * Net::Block (in email/Net/Block.pm) -- Minimal IPv4 netblock
representation, for testing which addresses are included.

About

Scripts I have found useful over the years. Mostly in Perl, exclusively for GNU/Linux.

Resources

Stars

Watchers

Forks

Packages

No packages published