Fink & Apple's X11

      / Utilities /

The following are some of the Unix utilities you can install with Fink.



Contents

align
bsdmktemp
di
Diffutils
fhist
num-utils
fileutils
Findutils
gawk
pstree
tree
xtail





align

Text filter that vertically aligns columns

Align is a general-purpose text filter tool that helps vertically align columns in string-separated tables of input text. With whitespace-separated columns, you can often use it without arguments and it'll guess the right thing to do. Otherwise, you can specify arguments to direct how the columns are separated on input and rejoined in the aligned output.

Width, also included in this package is another general-purpose text filter tool that helps you work with the printing width or length of lines of input text.

Running align -h and width -h will provide complete usage summaries.

Information





bsdmktemp

Utility for safely making temporary files and directories.

Mktemp is a simple utility designed to make temporary file handling in shells scripts be safe and simple. Traditionally, many shell scripts take the name of the program with the PID as a suffix and use that as a temporary filename. This kind of naming scheme is predictable and the race condition it creates is easy for an attacker to win. A safer, though still inferior approach is to make a temporary directory using the same naming scheme. While this does allow one to guarantee that a temporary file will not be subverted, it still allows a simple denial of service attack. For these reasons it is suggested that mktemp be used instead. The mktemp utility takes the given filename template and overwrites a portion of it to create a unique filename.

Information





di

di is a disk information utility.

It displays everything (and more) that your 'df' command does. It features the ability to display your disk usage in whatever format you desire, prefer or are used to. It is designed to be portable across many platforms.





Diffutils

diff - cmp- diff3 - patch - sdiff

Computer users often find occasion to ask how two files differ. Perhaps one file is a newer version of the other file. Or maybe the two files started out as identical copies but were changed by different people.

diff command
You can use the diff command to show differences between two files, or each corresponding file in two directories. diff outputs differences between files line by line in any of several formats, selectable by command line options. This set of differences is often called a 'diff' or 'patch'. For files that are identical, diff normally produces no output; for binary (non-text) files, diff normally reports only that they are different.

cmp command
You can use the cmp command to show the offsets and line numbers where two files differ. cmp can also show all the characters that differ between the two files, side by side.

diff3 command
You can use the diff3 command to show differences among three files. When two people have made independent changes to a common original, diff3 can report the differences between the original and the two changed versions, and can produce a merged file that contains both persons' changes together with warnings about conflicts.

patch command
patch takes comparison output produced by diff and applies the differences to a copy of the original file, producing a patched version. With patch, you can distribute just the changes to a set of files instead of distributing the entire file set; your correspondents can apply patch to update their copy of the files with your changes.

sdiff command
With sdiff, you can merge two files interactively based on a side-by-side -y format comparison.

Information
Manual





fhist

Minimal file history tool

The FHist package contains 3 utilities, a file history tool 'fhist', a file comparison tool 'fcomp', and a file merging tool 'fmerge'. All three are bundled together, because they all use the same minimal-difference algorithm.

fhist
Keeps track of versions of a file. It works correctly when given binary files as input. The fhist program is used to keep track of the successive versions of a file. Using this program, you can remember all of your changes to a file, and get back any one of the old versions.

fcomp
Compares two versions of a file, usually line-for-line textual comparison. It is capable of comparing two binary files byte-for-byte. The fcomp program is used to compare text files, similar to the diff(1) program. Its advantage is that it always produces minimal differences, and so will never mis-sync when comparing files. Its disadvantage is that it runs slower due to the extra work required to produce optimal differences. However, for files differing by less than a few thousand lines, its performance is adequate.

fmerge
Merges together edits from two descendants of a file. The fmerge program is used to compare the changes between two different descendants of a base file, and creates an output file which contains both sets of changes. This is useful when two users both take the same version of a file and make independent edits to it, and then later want to create a file which contains both sets of edits.

Information





num-utils

The 'num-utils' are a set of programs for dealing with numbers from the Unix command line. Much like the other Unix command line utilities like grep, awk, sort, cut, etc. these utilities work on data from both standard in and data from files. The utility set currently includes the following programs:

average:
A program for calculating the average of numbers. It will determine the average from all numbers on input.

bound:
Finds the boundary numbers (min and max) of input.

numgrep:
Like normal grep, but for sets of numbers.searches for different occurances of numbers through the use of numeric expressions.

numprocess:
Do mathmatical operations on numbers.

numsum:
Add up all the numbers.

random:
Generate a random number from a given expression.

range:
Generate a set of numbers in a range expression.

round:
Round each number according to it's value.

Information





fileutils

Common shell commands like ls, touch, chmod

The GNU file utilities have significant advantages over their standard UNIX counterparts, such as greater speed, additional options, and fewer arbitrary limits.

The tools supplied with this package are:

* chgrp - Changes file group ownership.
* chown - Changes file ownership.
* chmod - Changes file permissions.
* cp - Copies files.
* dd - Copies and converts a file.
* df - Shows disk free space on filesystems.
* dir - Gives a brief directory listing.
* dircolors - Setup program for the color output of GNU ls.
* du - Shows disk usage on filesystems.
* install - Copies file and sets its permissions.
* ln - Creates file links.
* ls - Lists directory contents.
* mkdir - Creates directories.
* mkfifo - Creates FIFOs (named pipes).
* mknod - Creates special files.
* mv - Moves files.
* rm - Removes (deletes) files.
* rmdir - Removes empty directories.
* shred - Destroy data in files.
* sync - Synchronizes filesystem buffers and disk.
* touch - Changes file timestamps.
* vdir - Long directory listing.

Information





Findutils

Tools for searching for files

find - locate - xargs

find
Is a program which searches a directory tree to find a file or group of files. It walks the directory tree and reports all occurences of a file matching the user's specifications. 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.

locate
Scans one or more databases of filenames and displays any matches.
(similar to the "fast find" on many systems).

xargs
Builds and executes command lines by gathering together arguments it reads on the standard input. Most often, these arguments are lists of file names generated by 'find'. Its -0 option works with GNU find to avoid problems with the standard xargs.

Information





gawk

The Awk processing language, GNU edition

gawk is a version of awk from the Free Software Foundation. It has many more features than the original awk. If you are like many computer users, you would frequently like to make changes in various text files wherever certain patterns appear, or extract data from parts of certain lines while discarding the rest. The `awk' utility interprets a special-purpose programming language that makes it possible to handle simple data-reformatting jobs with just a few lines of code.

Using awk allows you to:

Manage small, personal databases
Generate reports
Validate data
Produce indexes and perform other document preparation tasks
Experiment with algorithms that you can adapt later to other computer languages

In addition, gawk provides facilities that make it easy to:

Extract bits and pieces of data for processing
Sort data
Perform simple network communications

Information





pstree

Is a small program that shows the process-listing as a tree (as the name implies...). It has several options to make selection criteria and to change the output style.

Information





tree

Tree is a recursive directory listing program that produces a depth indented listing of files, which is colorized ala dircolors if the LS_COLORS environment variable is set and output is to tty. With no arguments, tree lists the files in the current directory. When directory arguments are given, tree lists all the files and/or directories found in the given directories each in turn. Upon completion of listing all files/directories found, tree returns the total number of files and/or directories listed.

By default, when a symbolic link is encountered, the path that the symbolic link refers to is printed after the name of the link in the format:

name -> real-path

If the '-l' option is given and the symbolic link refers to an actual directory, then tree will follow the path of the symbolic link as if it were a real directory.

Information





xtail

Watches the growth of files

Xtail monitors one or more files, and displays all data written to a file since command invocation. It is very useful for monitoring multiple logfiles simultaneously.

If an entry given on the command line is a directory, all files in that directory will be monitored, including those created after the xtail invocation. If an entry given on the command line doesn't exist, xtail will watch for it and monitor it once created. When switching files in the display, a banner showing the pathname of the file is printed.

Even though in the README file of xtail it says that it is similar in functionality to running a "tail -f filename" command, it is actually quite different. Whereas tail will only monitor any changes appended to the end of a file, xtail actually monitors the entire file. When xtail is invoked with the following command:

% xtail /var/log/messages

It will monitor the /var/log/messages file for any changes, this includes both new data and deletions. Xtail continuously searches through the list of files looking for any changes and reporting this information to standard output. Xtail uses two different parameters within its C looping function to determine if a file that it is monitoring has changed:

The size of the file
The mtime of the file


Information









astronaut / Make Contact /
drop me a line at:       sao1@mac.com

MacOS X,    Fink,    X11,    Unix    ...and other related things