"Linux Gazette...making Linux just a little more lovable!"
The Cracraft and Lijewski DIRED Programs
The directory navigator and program launcher called "DIRED"
in the original incarnations of EMACS has two stand-alone
Unix clones. Mike Lijewski's "dired" 2.2 is written in C++
(1996). The original "dired" was written in C by Stuart
Cracraft (1980), available as version 3.05 (1997).
Historically, shortly after emacs "dired" appeared in the
TECO implementation, a stand-alone version was written by
Stuart Cracraft (1980). The emacs version and the C version
have not kept up with one another.
Lijewski wrote "dired" in 1990, while at Cornell University
Theory Center, without any knowledge of Cracraft's "dired".
The Theory Center ran on IBM VM/CMS, under which there is a
utility call "file manager". This program manages the flat
VM/CMS file system and represents the main user interface
into files. The creation of "dired" eased the transition
from VM/CMS to Unix.
Lijewski's "dired" has the advantage of hindsight and C++
program development so it promises to be written in modern
syntax and very maintainable. Cracraft's "dired" was
rewritten in 1996 in ANSI C. It suffers with flaws in both
design and readability, but the features are there.
Common features of Cracraft's and Lijewski's "dired"
- Copy current file
- Hard link current file to another file.
- Symbolic link current file to another file.
- Unzip current file (gunzip).
- Zip current file (gzip).
- Rename current file.
- Display help.
- Cursor up one.
- Cursor down one.
- Back one page.
- Forward one page.
- Go to first file.
- Go to last file.
- Do shell command /w filename substitution.
- Search forward for file matching regular expression.
- Search reverse for file matching regular expression.
- Launch EDITOR on a file or DIRED on a directory.
- Recognize new window size and refresh screen.
- Delete current file
- Prompt for and edit a directory.
- Change the mode of the current file.
- Launch PAGER on this file.
- Sort the file list.
- Print file contents.
- Reload directory.
- Abort DIRED.
- Suspend DIRED.
- Exit immediately.
- Setup by command line, resource file or environment variable.
Minor differences exist in the implementation of these
features. Cracraft's dired supports split screen.
Lijewski's dired supports scrolling by half-page. Deletes
in Cracraft's dired are done in batch whereas Lijewski's
dired does them immediately.
Curiously, the common features of the two direds also
account for the most often used dired commands.
The differences between Lijewski's "dired" and Cracraft's
"dired" in 1997 appear below. Many features commonly exist
in both versions, so only the superficial differences are
discussed. Strengths and weaknesses of each are also
listed.
Unique features of Lijewski's "dired"
- Compress current file.
- Uncompress current file.
- Change the group of the current file.
- View only files matching a regular expression.
Strengths:
- Excellent for persons with minimal Unix knowledge.
- Has a full complement of basic commands for file maintenance.
- Key configuration in resource file "~/.diredrc".
Weaknesses:
- Does file maintenance one file at a time with prompts.
- Fixed full screen format.
- No ANSI colorization to match color-ls.
Unique features of Cracraft's Dired 3.05
- Manual page display, DIRED 3.05 in detail.
- Key Tutor. Describe key. Execute key.
- Tag files for later processing.
- Dynamic format setup for the screen and shell commands.
- Toggle colorization of file names (4 color tables).
- Undo search and page move.
- Bookmarks.
- Abort or suspend DIRED and PUSHD to the displayed directory.
- Groff current file as a manual page.
- Type current text or binary file on terminal with pause.
- Write the formatted file list to a unique file in /tmp.
- Aliased shell commands, interactive or in resource ~/.diredset.
- Setup for shell commands attached to internal variables.
Strengths:
- Favors use by seasoned Unix people.
- Configurable screen format.
- Keys are fixed to give uniformity across different hosts.
Weaknesses:
- Key configuration is compiled into "dired" and can't be changed.
Misfeatures of both versions of "dired"
The program tends to be used for browsing and deleting
files; users find the other features too obtuse for daily
use. Too many commands. Its hard to remember what key does
which command.
How to Get Dired
Find dired305.zip at
http://sunsite.unc.edu/pub/Linux/. Or email to
gustafson@math.utah.edu
for location of recent version.
Find Lijewski's c++ dired by sending email to
lijewski@mothra.lbl.gov
for location of the recent version. If you want to see it on sunsite,
then let Mike hear about it!
Copyright © 1997, Grant B. Gustafson
Published in Issue 14 of the Linux Gazette