Search the Catalog
UNIX Power Tools, 2nd Edition

UNIX Power Tools, 2nd Edition

By Jerry Peek, Tim O'Reilly & Mike Loukides
2nd Edition August 1997
1-56592-260-3, Order Number: 2603
1120 pages, $59.95, Includes CD-ROM

Unix Power Tools: Examples

Here are descriptions of the programs and other example files in the second edition of UNIX Power Tools, published in 1997 by O'Reilly & Associates, Inc. You'll also find links to the files:

If you know the names of the files you want, click on one of the names below; it'll take you to the description of that file and a link to it. Or, if you feel like browsing, scroll down and read through the descriptions.

!.emacs_ml.enter.csh.enter.sh.exit.csh.exit.sh80colsClearaddupage_filesasciiawfbashbeheadbkeditbsdtarbsplitcal_todaycalencatsawaycentercgrepcgrep.sedchecksedchmod_editchunksortcleanupcleanup.sedclscolscount.itcount_typescpmodcrontabcrushcsh_initcsh_logoutcsplitcut+pastecvtbasedeldeletediffdir_pathdirtopdoublespaceediffelookforemacsexpandexpectexrcfgrepfileutilsfindcmdfindtextfindutilsflipfmtfmt.shformprogftpfilegawkgetmacgetoptglimpsegnroffgrabcharsgrepgroffgzipheadheyhgrepindexiplispelljotlensortlesslflndirlogerrslonglineslooklookforls_todaymake_printmanindexmotd.diffnamesortnetpbmnextdayno_runnomoffsetoldlinksopttestpaircheckpatchpcalperl5phonepipegreppstextpsutilspushinqcshqsubstqtermrcsrcsegrep.fastrcsgreprcsrevsrecommentredorelinkrenrenamerotrunsedruntimescscreenscreensizescript.tidysearch.elsedmansh_initsh_logoutsharsh-utilsshowmatchslslssmileysquozestatstreestrippersutartcaptcltcshtermtesttextutilstgreptmtpipetputinittriplespacetwinunexpandvgrepvisvtreewatchqwhereizwhichwordfreqxargsxgrepxtailzapzloopzmorezvi

!

The ! command (pronounced "bang") creates temporary files to be used with programs that require filenames in their command lines. For example, to diff two files after sorting them, you might do:

diff `! sort file1` `! sort file2`

[Overview] [List]

.emacs_ml

The .emacs_ml file contains a listing of Mike's favorite Emacs commands. If you like them, put them in your own $HOME/.emacs file. [Overview] [List]

.enter.csh

.enter.csh is an example of a C shell script you might want to run when your C shell enters a particular directory. It is meant to be used with an alias (which can be found in the csh_init file) and with a .exit.csh script. [Overview] [List]

.enter.sh

.enter.sh is an example of a Bourne shell script you might want to run when your Bourne-type shell (including ksh and bash) enters a particular directory. It is meant to be used with a shell function (which can be found in the sh_init file) and with a .exit.sh script. [Overview] [List]

.exit.csh

.exit.csh is an example of a shell script you might want to run when your C shell leaves a particular directory. It is meant to be used with an alias (which can be found in the csh_init file) and with a .enter.csh script. [Overview] [List]

.exit.sh

.exit.sh is an example of a shell script you might want to run when your Bourne-type shell (including ksh and bash) leaves a particular directory. It is meant to be used with a shell function (which can be found in the sh_init file) and with a .enter.sh script. [Overview] [List]

80cols

The 80cols file simply contains 80 digits on a single line. You can use this file to determine whether your screen is 80 columns wide, with:

cat 80cols

[Overview] [List]

Clear

The Clear shell script can be used to execute VT100 escape sequences. It is also linked to the names NOG (to cancel an alternate character set); Graphics (to enable graphics mode); C132 (to enable 132-column mode); C80 (to enable 80-column mode); Revvid (to enable reverse video); Normal (to re-enable normal video); ToStatus (to write a message to the terminal status line); and ClrStatus (to clear the status line). [Overview] [List]

addup

addup is a shell script that uses awk to add up the values in a specified column in its input. [Overview] [List]

age_files

The age_files shell script reports the size of the files in a given directory by age. [Overview] [List]

ascii

ascii is a shell script that searches a listing of the ASCII character set and returns the ASCII decimal value of a specified character. [Overview] [List]

awf

awf (Amazingly Workable Formatter) is an nroff -man or nroff -ms clone written entirely in (old) awk. It is slow and has many restrictions, but does a decent job on most manual pages and simple -ms documents. It is also a text formatter that is simple enough to be tinkered with, for people who want to experiment. [Overview] [List]

bash

bash is the GNU Project's Bourne Again SHell, an interactive shell with Bourne shell syntax. It also includes interactive command-line editing, job control on architectures that support it, csh-like history features and brace expansion, and a slew of other stuff.

[Overview] [List]

behead

The behead shell script removes all lines in a file up to the first blank line. This effectively removes the header from files saved from mail or news. [Overview] [List]

bkedit

bkedit is a shell script for making a backup copy of a file before starting the vi editor on it. [Overview] [List]

bsdtar

bsdtar is very similar to tar, but can remap long filenames to unique 14-character filenames on systems that have a 14-character filename limit. bsdtar can only read archives, it cannot create archives. [Overview] [List]

bsplit

bsplit enables you to split binary files into manageable pieces. Users who are familiar with split will have no problem with bsplit, as the usage of bsplit is exactly like the split program. [Overview] [List]

cal_today

cal_today is a simple shell script that runs cal and marks today's date. [Overview] [List]

calen

calen generates a calendar for a whole year or for a certain range of months within a year in 132 columns. [Overview] [List]

catsaway

The catsaway shell script is included here as an example of using a loop to repeat a command until it fails. [Overview] [List]

center

center is an awk script that centers each line of a file. [Overview] [List]

cgrep

cgrep is a context-grep Perl script for showing the given string with several lines of surrounding text. [Overview] [List]

cgrep.sed

cgrep.sed is a context-grep sed script for showing the given string with several lines of surrounding text. It can also match a pattern that's spread across several lines. [Overview] [List]

checksed

The checksed shell script runs the sed commands in a file called sedscr on the specified files, showing the edits with diff and a pager program. [Overview] [List]

chmod_edit

The chmod_edit shell script adds write permission to a file, places you in your favorite editor, and then removes write permission again. [Overview] [List]

chunksort

The chunksort program sorts multi-line records that are separated by blank lines. [Overview] [List]

cleanup

cleanup is an example of a shell script to be run by cron. By combining multiple find conditions, the find command is run only once instead of multiple times. [Overview] [List]

cleanup.sed

cleanup.sed is a sed script to be run on troff input files. It converts double quotes to "curly" quotes, two dashes to em-dashes, and places a no-space character before constant-width font changes. It should be called with sed -f cleanup.sed. [Overview] [List]

cls

cls is a compressed directory lister that can list directories in nice columns and indicate "long" names that have been truncated. It is also linked to the names clf, cls2, and clf2. [Overview] [List]

cols

The cols shell script displays output in columns. You should make filesystem links named c2, c3, c4, c5, c6, c7, and c8; these names force the script to display the respective number of columns. [Overview] [List]

count.it

count.it reports the difference in word length between two files. [Overview] [List]

count_types

count_types is a shell script that counts the number of files of each type, as reported by the file command. [Overview] [List]

cpmod

cpmod allows you to copy modes, ownerships, and times from one file to others, without affecting the data. [Overview] [List]

crontab

The crontab shell script provides interactive editing of your crontab entries. This script is meant for systems that do not already provide interactive crontab file editing. [Overview] [List]

crush

crush is a sed script that removes blank lines from text and sends the result to standard output. [Overview] [List]

csh_init

The csh_init file is a collection of C shell commands and alias definitions that are shown throughout the book. Most of these are also available as Bourne-type shell functions in the sh_init file.

In its distribution form, each set of commands is commented out and needs to be explicitly uncommented before you can use them; this is because many of the definitions override or conflict with one another. You can copy or source the file into your shell setup file, and then enable the definitions that you want. [Overview] [List]

csh_logout

The csh_logout file contains a set of commands for removing temporary files. C shell users can input these commands into their ~/.logout file. [Overview] [List]

csplit

The csplit program splits a file according to context. It's part of the GNU textutils. [Overview] [List]

cut+paste

cut and paste are GNU versions of AT&T's cut and paste commands. It's part of the GNU textutils. [Overview] [List]

cvtbase

cvtbase is a program for converting from one base to another. Supported bases are decimal, hexadecimal, octal, and binary. [Overview] [List]

del

del is a shell script that prompts you for the removal of the specified files. Unlike rm -i, del prompts you only once for all files when there are more than three to remove. [Overview] [List]

delete

The delete program is a replacement for rm that allows files to be recovered later on. Instead of actually deleting files, delete marks them for deletion by adding a ".#" prefix. To recover the file, use undelete. To delete the files for real, use expunge or purge. To list all the files in the current directory that are marked for deletion, use the lsdel command. [Overview] [List]

diff

The GNU versions of diff, diff3, sdiff, and cmp provide all the features of BSD's diff, but with some additional features.

[Overview] [List]

dir_path

dir_path is a shell script that shows all directories with the same name. [Overview] [List]

dirtop

The dirtop shell script uses VT100 escape sequences to make an ls directory listing that stays at the top of the window while you work. [Overview] [List]

doublespace

doublespace is a sed script that double-spaces text and sends the result to standard output. [Overview] [List]

ediff

ediff is a program that translates diff output into English. [Overview] [List]

elookfor

The elookfor script is similar to the lookfor script, but faster. It finds all files in the given directory tree that contain the given string(s), using egrep. [Overview] [List]

emacs

GNU Emacs is the GNU incarnation of the advanced, self-documenting, customizable, extensible real-time display editor Emacs.

[Overview] [List]

expand

GNU expand converts TAB characters into the corresponding number of spaces. It's part of the GNU textutils. [Overview] [List]

expect

Expect is a program to control interactive applications, such as telnet and passwd, that prompt you to type something at the prompt. You can write simple Expect scripts to automate these interactions. Then the Expect script can run the "interactive" program non-interactively. (Expect programs are almost always written using Tcl.) [Overview] [List]

exrc

The exrc file is a collection of vi and ex commands that are shown throughout the book. In its distribution form, each set of commands is commented out and needs to be explicitly uncommented before you can use them; this is because many of the definitions override or conflict with one another. You can copy this file into your .exrc file, and then enable the definitions that you want. [Overview] [List]

fgrep

Although it matches only literal strings, fgrep has several features that make it worth installing.

[Overview] [List]

fileutils

The GNU file utilities have significant advantages over their standard UNIX counterparts, such as greater speed, additional options, and fewer arbitrary limits. Programs included are: chmod, chgrp, chown, cp, dd, df, du, install, ln, ls, mkdir, mkfifo, mknod, mv, rm, rmdir, and touch. Most of these programs are covered throughout the book.

[Overview] [List]

findcmd

findcmd searches your path and prints any program's filename that contains the given substring. [Overview] [List]

findtext

The findtext shell script prints the names of specified files that are text files (i.e., human-readable). [Overview] [List]

findutils

GNU find has several enhancements over the standard find command found on most systems. Among other things, it has the option to measure times from the beginning of today rather than from 24 hours ago, and it has user-settable maximum search depth.

find is also distributed with the GNU xargs program, which is used to execute a command with many arguments. Its -0 option works with GNU find to avoid problems with the standard xargs.

Finally, the package includes the GNU locate program, which lists files in a database that match a pattern (similar to the "fast find" on many systems).

[Overview] [List]

flip

flip is a Perl script that reverses the text in a given file line-by-line. That is, the first line in the file switches position with the last, the second line in the file switches with the next-to-last, and so on. [Overview] [List]

fmt

fmt neatens text into paragraphs that are (by default) no longer than 72 characters. This GNU version has several other formatting features. It's part of the GNU textutils. [Overview] [List]

fmt.sh

fmt.sh is a shell script that uses sed and nroff to simulate the behavior of the fmt command. It is meant for systems that are not distributed with fmt already installed. [Overview] [List]

formprog

formprog is a shell script for filling in forms. It looks for a template file (argument 1) and prompts the user for information, placing the completed form into an output file (argument 2). [Overview] [List]

ftpfile

ftpfile is a shell script for anonymously ftp'ing a file. It is included in the archive as an example of a here document. [Overview] [List]

gawk

gawk is a version of awk from the Free Software Foundation. It has many more features than the original awk.

[Overview] [List]

getmac

getmac is a shell script for printing a troff macro definition in the specified macro package. [Overview] [List]

getopt

getopt is a public-domain implementation of the System V getopt program. Not to be confused with the library routine, this program helps scripts parse their options/flags/arguments. Also get opttest, a script that demonstrates getopts. [Overview] [List]

glimpse

Glimpse (at ftp://ftp.cs.arizona.edu/glimpse/) is an indexing and query system that lets you search huge amounts of text (for example, all of your files) very quickly. Part of the glimpse package is agrep, a standalone utility for fast text searching. agrep is similar to the other members of the grep family, but it is much more general (and usually faster). The enhancements over other greps include the ability to search for approximate patterns. [Overview] [List]

gnroff

gnroff is the GNU version of the nroff text formatter. It's part of the groff package. [Overview] [List]

grabchars

grabchars gets one or more keystrokes from the user without requiring them to press RETURN. It was written to make all types of shell scripts more interactive. [Overview] [List]

grep

GNU egrep (also linked to grep) is about twice as fast as stock UNIX egrep.

[Overview] [List]

groff

groff is the GNU version of the troff text formatter. Included are implementations of troff, pic, eqn, tbl, refer, the man macros and the ms macros, and drivers for PostScript, TeX dvi format, and typewriter-like devices. Also included is a modified version of the Berkeley me macros, and an enhanced version of the X11 xditview.

[Overview] [List]

gzip

GNU gzip allows compression of files. In addition to the gzip program itself, the package includes gunzip and gzcat.

[Overview] [List]

head

The head shell script simulates the behavior of the head command distributed with many versions of UNIX. It is meant for systems that do not have the head program already installed. [Overview] [List]

hey

hey is a shell script for people who use systems other than UNIX--and type non-UNIX commands on a UNIX system. It prints a snide remark to remind you of your mistake, then runs the UNIX command you intended to use. The script is ready for you to make UNIX links named dir and md. [Overview] [List]

hgrep

hgrep is a trivial, but cute, front-end for grep. It takes the results of the grep and highlights the word that was searched for. [Overview] [List]

index

index allows you to maintain multiple databases of textual information, each with a different format. With each database, index allows you to add entries, delete entries, edit existing entries, search for entries using full regular expressions, and run all or part of the database through a user-configured filter. [Overview] [List]

ipl

ipl is a two-dimensional graphic production system. It produces scatter plots, line plots, bar graphs, range displays, pie graphs, US/Canada maps, schedule charts, boxes, arrows, text, etc. ipl produces PostScript output, based on a user-supplied control file. It also includes a table beautifier that is useful for taking plain text tables, spreadsheet output, etc. and setting them in a nice font. [Overview] [List]

ispell

ispell is a fast screen-oriented spelling checker that shows your errors in the context of the original file, and suggests possible corrections when it can figure them out. Compared to UNIX spell, it is faster and much easier to use. ispell can also handle languages other than English.

[Overview] [List]

jot

jot is a simple tool that allows you to print sequential or random data. It can be very useful for constructing loops in shell scripts. [Overview] [List]

lensort

lensort sorts lines from shortest to longest. [Overview] [List]

less

less is an extremely flexible pager and is preferred by many to pg or more. less has all of the functionality of more, in addition to backwards scrolling, bookmarks, searching (forward and backward, single, and multi-file), and many other useful features.

[Overview] [List]

lf

lf is actually five commands linked to the same script. Each command results in calling the ls command with a different set of command-line options. In addition to lf, there is also ll, lg, lm, and lr. [Overview] [List]

lndir

lndir is a safe way to duplicate a directory structure elsewhere on the filesystem. It's necessary because a cd into a straight symbolic link actually changes to the directory pointed to by the link, which can be confusing or even dangerous if the link is in a sensitive area of the filesystem. lndir recursively re-creates a directory structure, making symbolic links to all the files in the directory. [Overview] [List]

logerrs

The logerrs script sends errors to a log file as well as to standard error. [Overview] [List]

longlines

The longlines file contains several lines with 200 columns of text. You can use this file to test whether line wrapping is working correctly, or to adjust windows to a particular size, with:

cat longlines

[Overview] [List]

look

look is a fairly fast, fairly portable version of look, the program for searching sorted files. [Overview] [List]

lookfor

The lookfor script finds all files in the given directory tree that contain the given string(s). [Overview] [List]

ls_today

ls_today is a shell script to print the names of files that have been created or edited today. [Overview] [List]

make_print

make_print is an example Makefile for printing a series of files that have changed. It is meant to be renamed makefile or Makefile and run with make. [Overview] [List]

manindex

manindex simulates the behavior of the apropos command found on many systems. It generates an index that you can later search using the following alias:

alias apropos "grep -i \!$ indexfile"

[Overview] [List]

motd.diff

motd.diff is a shell script to be called from your .login file. It only displays lines in the message-of-the-day that have changed since the previous login. [Overview] [List]

namesort

The namesort program sorts a list of names by the last name. [Overview] [List]

netpbm

netpbm is the latest version of pbmplus, the Extended Portable Bitmap Toolkit. netpbm converts various image formats to and from portable formats, and therefore to and from one another. In addition to the converters, the package includes some simple tools for manipulating the portable formats.

[Overview] [List]

nextday

The nextday shell script returns the name of the next day of the week, to supply to the at command. It can also be linked to the name nextweekday, in which case the next weekday is returned (for example, on Friday nextweekday will return "Monday"). [Overview] [List]

no_run

The no_run file contains an example of a shell script that you can enter into your private $HOME/bin directory and link to the names of programs that you might not want to run on some systems. It's meant for use on a network where you have the same home directory on several machines of different architectures. After editing the script, you can link it to the names of the commands that are run differently (or not at all) on some systems. Of course, the directory that you install and link the scripts in (such as $HOME/bin) must be in your path before any system-wide executables. [Overview] [List]

nom

nom ("no match") supplies the names of the files in the current directory that "don't" match the given shell wildcards. For example, to edit all files in the current directory that don't end in .o, try:

vi `nom *.o`

[Overview] [List]

offset

The offset shell script indents text for printing or other uses. [Overview] [List]

oldlinks

oldlinks is a shell script that prints the names of "stale" symbolic links. [Overview] [List]

opttest

opttest is a shell script for parsing getopt output. It's meant to demonstrate getopt's behavior. [Overview] [List]

paircheck

paircheck is an example script for making sure that strings in a file have matching counterparts. paircheck checks that each ".TS" in a given troff file has a corresponding ".TE"; but it's easy to modify to check other kinds of pairs. [Overview] [List]

patch

patch is Larry Wall's program for distributing source patches to files. By using diff files (generally "context diffs"), patch can intelligently apply patches to a file even if modifications have been made to the source in the meantime. patch is used extensively to communicate source changes throughout the world.

[Overview] [List]

pcal

pcal generates PostScript to produce landscape or portrait calendars for any month and year. By default, pcal simply prints an empty calendar. Its real power is in its ability to place "events" in appropriate days on the calendar, thus allowing the user to create personalized calendars. [Overview] [List]

perl5

perl version 5 is a new and improved version of Perl 4, the very popular "kitchen-sink" language for doing almost anything you'd want to do with text or on your system.

[Overview] [List]

phone

phone is a shell script that displays lines in a file called phone, matching the given string to standard output. It can also be linked to the name address, in which case it returns matching lines in a file named address. [Overview] [List]

pipegrep

pipegrep searches through the output of a series of commands, printing the command that produced each line of output. [Overview] [List]

pstext

pstext is a utility for converting text files to PostScript files--usually for a PostScript printer. It includes options for printing "landscape" mode, for specifying a font, and for specifying a point size. [Overview] [List]

PSUtils

PSUtils (at ftp://ftp.dcs.ed.ac.uk/pub/ajcd/psutils.tar.gz) is a collection of utilities for manipulating PostScript documents: rearranging pages, printing only some pages, and so on. [Overview] [List]

pushin

pushin is a sed script that removes any extra white space characters in a file and sends the result to standard output. [Overview] [List]

qcsh

The qcsh file has a shell function that lets you use C shell features such as the curly brace { } operators from either the Bourne or Korn shell. [Overview] [List]

qsubst

qsubst is designed for substituting strings in (large) files. It accepts a list of filenames and two strings. For each of the files, qsubst modifies it in-place to replace string1 with string2 wherever the user approves the change. [Overview] [List]

qterm

qterm is a program that queries terminals to find out what kind of terminal is responding. It is useful to "automagically" define your terminal type. It prints the name of the terminal (such as "vt100") to standard output. (This name is hopefully compatible with a termcap/terminfo name on your system.) [Overview] [List]

rcs

RCS (Revision Control System) is a set of commands for managing multiple revisions of files. RCS automates the storing, retrieval, logging, identification, and merging of revisions. RCS is useful for text that is revised frequently; for example programs, documentation, graphics, papers, and form letters.

[Overview] [List]

rcsegrep.fast

rcsegrep.fast is a shell script (written mostly in nawk) that searches the most recent revision of one or more RCS files for a given string. It's fast because it reads the RCS file directly. Only recommended when you have a lot of files to search; use rcsgrep otherwise. [Overview] [List]

rcsgrep

rcsgrep is a shell script that searches revisions of RCS files for a given string. Can also be called through links named rcsegrep and rcsfgrep. [Overview] [List]

rcsrevs

rcsrevs is a shell script that lists all the revision numbers archived in an RCS file. [Overview] [List]

recomment

The recomment shell script runs fmt on files with lines that are commented out, with wrapped lines recommented. [Overview] [List]

redo

redo is a utility that allows you to browse through, edit, and execute commands on your C shell history list. It is a C shell script that is sourced in using an alias. This alias appears in the csh_init file. [Overview] [List]

relink

relink is a perl script for relinking multiple files, similar to the rename script. [Overview] [List]

ren

ren is a program that can rename many files according to search and replacement patterns, ala VMS (but better). ren checks for replacement name collisions and handles rename chains gracefully. [Overview] [List]

rename

rename is a perl script for renaming multiple files. [Overview] [List]

rot

rot rotates a file, so that lines become columns, and vice versa. Without any options, the file will be rotated clockwise. [Overview] [List]

runsed

The runsed shell script runs the sed commands in a file called sedscr on the specified files, overwriting the original files. [Overview] [List]

runtime

runtime repeatedly executes time on a given command and then reports the average time taken over those iterations. The actual output of the command is discarded. [Overview] [List]

sc

sc is a spreadsheet calculator based on rectangular tables, much like a financial spreadsheet. [Overview] [List]

screen

screen is a window manager that allows you to handle several independent screens (UNIX ptys) on a single physical terminal.

[Overview] [List]

screensize

The screensize file contains 69 lines of text, starting at 69 and ending at 1. You can use this file to determine how many rows are displaying on your screen, with:

cat screensize

[Overview] [List]

script.tidy

script.tidy uses sed to clean up files generated with the script program. [Overview] [List]

search.el

The search.el file contains a set of Emacs search commands. To use these commands, use the load-file command in your $HOME/.emacs file to point to this file. [Overview] [List]

sedman

sedman is a sed script for formatting simple manual pages. [Overview] [List]

sh_init

The sh_init file is a collection of Bourne-type shell function and alias definitions that are shown throughout the book. Most of these are also available as C shell functions in the csh_init file.

In its distribution form, each set of commands is commented out and needs to be explicitly uncommented before you can use them; this is because many of the definitions override or conflict with one another. You can copy or source the file into your shell setup file, and then enable the definitions that you want. [Overview] [List]

sh_logout

The sh_logout file contains a set of commands for removing temporary files. Bourne-type shell users can input these commands into their logout file (such as .bash_logout). [Overview] [List]

shar

The shar package is a set of tools to create and unpack shell archives. This set of tools is designed to make it easier to ship groups of files.

[Overview] [List]

sh-utils

GNU Shell Utilities is a package of small shell programming utilities. These utilities are generally more robust and have more features than the system-supplied alternatives. Programs included are: basename, date, dirname, env, expr, false, groups, id, nice, nohup, pathchk, printenv, printf, sleep, stty, tee, test, true, tty, uname, who, whoami, and yes. Most of these programs are covered throughout the book. Note that because nice, stty, and uname require facilities that are not available on all systems, they are only installed when appropriate.

[Overview] [List]

showmatch

The showmatch shell script shows the strings in a given file that match the specified regular expression. [Overview] [List]

sl

sl is a Perl script for showing the actual filenames for symbolic links. [Overview] [List]

sls

sls is a program designed to overcome the limitations of the standard UNIX ls program, providing a more consistent interface to file inode information. It is particularly designed for use by shell scripts to make obtaining information about files easier. It uses printf-style format strings to control the sorting and output of file information. [Overview] [List]

smiley

smiley is a "smiley server." It can explain any smiley it knows, or print one it knows at random. [Overview] [List]

squoze

squoze is a utility for shrinking a huge directory. [Overview] [List]

stat

stat prints out the contents of an inode (as it appears to the stat(2) system call) in a human-readable format. [Overview] [List]

stree

stree is a shell script that prints a simple directory tree. [Overview] [List]

stripper

stripper is a simple shell script for stripping any binary files in $HOME/bin that aren't already stripped. [Overview] [List]

su

The su shell script is a front-end to the system-wide su, for versions of su that don't set your home directory or username properly in the new shell. [Overview] [List]

tar

GNU tar is upwards compatible with the standard tar supplied with your operating system. It adds many new features including remote devices, compression, multi-volume archives, the ability to extract to standard output, the ability to extract using wildcards, interactive confirmation, the ability to extract only "missing" files, and the ability to store only files newer than a given date.

[Overview] [List]

tcap

tcap is a utility that gives shell scripts access to termcap escape sequences, similar to tput. It is generally distributed under the name tc. We have renamed it here to avoid confusion with the standard tc command that is distributed under many operating systems. [Overview] [List]

tcl

Tcl (at ftp://ftp.scriptics.com/pub/tcl/tcl8_1/) is a widely used shell-like language. It's in the archive mostly because of Expect, which is integrated on top of Tcl. But Tcl is also very useful on its own. You'll probably also want Tk (from ftp://ftp.scriptics.com/pub/tcl/tcl8_1/). [Overview] [List]

tcsh

tcsh (from ftp://ftp.astron.com/pub/tcsh/) is a version of the Berkeley C shell, with the addition of a command line editor; command and filename completion, listing, etc.; and several small additions to the shell itself. [Overview] [List]

termtest

termtest is a shell script that quickly sends repeated characters to the screen. You can use it to test your terminal connection, by scanning for line noise or dropped characters. [Overview] [List]

textutils

The GNU text processing utilities have significant advantages over their standard UNIX counterparts, such as greater speed, additional options, and fewer arbitrary limits. Most of these programs are covered throughout the book.

[Overview] [List]

tgrep

tgrep only searches through files that contain text. It is useful for searching through directories that contain both binary and text files. [Overview] [List]

tm

The tm script gives the current time in countries all over the world. [Overview] [List]

tpipe

tpipe is a simple utility program that can be used to split a UNIX pipeline into two pipelines. Like tee, tpipe transcribes its standard input to its standard output. But where tee writes an additional copy of its input to a file, tpipe writes the additional copy to the input of another pipeline that is specified as the argument to tpipe. [Overview] [List]

tputinit

tputinit is a shell script for simulating the terminal initialization commands generated by tput init. It can be used on systems with older versions of tput that don't support the init keyword. [Overview] [List]

triplespace

triplespace is a sed script that triple-spaces text and sends the result to standard output. [Overview] [List]

twin

twin is used to compare two similar files. They will be displayed side-by-side with any mismatched lines shown in reverse video. [Overview] [List]

unexpand

GNU unexpand converts space characters into TABs at 8-column tabstops. It's part of the GNU textutils. [Overview] [List]

vgrep

The vgrep shell script supplies a list of filenames that don't contain the given string. It's sort of a grep -v for complete files instead of for individual lines. [Overview] [List]

vis

vis is a program that repeatedly executes a specified command and refreshes the display of its output on the screen. [Overview] [List]

vtree

vtree gives a visual directory tree, designed to show the layout of a directory tree or filesystem. It has options to show the amount of storage being taken up in each directory, count the number of inodes, etc. [Overview] [List]

watchq

watchq is a daemon that monitors the queues for several printers and sends messages to users when errors occur. [Overview] [List]

whereiz

whereiz lists all executables in your path that match the given name. [Overview] [List]

which

which is an improved version of the standard which utility. This version returns the full expansion of the command argument, be it either an alias, a shell function, or the path to an executable file. [Overview] [List]

wordfreq

wordfreq reports the number of times each word appears in a given file. [Overview] [List]

xargs

The GNU version of the xargs utility is used to execute a command with many arguments. Its -0 option works with GNU find to avoid problems in the standard xargs. It's part of the GNU findutils. [Overview] [List]

xgrep

Most grep-like programs search for lines that match a regular expression, then outputs the entire lines. xgrep is a sed script that retrieves only the matching text--not (necessarily) a whole line. [Overview] [List]

xtail

xtail watches the growth of files. It is similar to tail -f, but can be used to watch many files at once. [Overview] [List]

zap

zap interactively allows you to kill processes by running ps and then querying you about killing each process reported by ps. Also needs the script pick, which lets you choose from its command-line arguments. [Overview] [List]

zloop

zloop is a shell script for running a command on a set of compressed files. [Overview] [List]

zmore

The zmore shell script runs more on compressed files. It is also linked to the names zpg and zless. Other links named vmore, vpg, and vless show "unprintable" characters in a way you can see them without affecting your screen. Finally, links named rcsmore, rcspg and rcsless page through the latest revision of an RCS file--without creating a working file. [Overview] [List]

zvi

zvi is a shell script for running the vi editor on compressed files. It is also linked to the programs zex and zed for running ex or ed on compressed files, respectively. [Overview] [List]

UNIX Power Tools FTP archive | UNIX Power Tools book description

jpeek@jpeek.com


Back to:Unix Power Tools, 2nd Ed.


oreilly.com Home | O'Reilly Bookstores | How to Order | O'Reilly Contacts
International | About O'Reilly | Affiliated Companies | Privacy Policy

© 2001, O'Reilly & Associates, Inc.