DIRED(1) UNIX System V (Original: June 21 1988) DIRED(1) NAME dired - directory editor SYNOPSIS dired [ -[d] ] [ -n ] [ [dir-name|file-list] ] DESCRIPTION Dired displays a long-form ls directory listing on the screen of a display terminal and allows you to 'edit' and peruse that listing by moving up and down it, deleting, editing, and displaying entries. It is similar to Emac's dired mode but I think it comes from Tenex. Your shell TERM variable should be set to the standard string which the Berkeley termcap library uses for distinguishing terminals. With no argument, the connected directory is used. With only one argument, if that argument is a directory, it is used. With multiple arguments, (or a single non-directory argument) the argument(s) are interpreted as filenames. Dired then types 'Reading' and gets information about the various files/directories in your specification. This may take a short while (depending on how many you give it), so it types one period (.) after the word 'reading' for every 10 files it has gathered information about. With this, you can keep track of its progress. Interrupts, hangups, and the like are disabled since your terminal is put into a special mode that is only changed when you quit with the 'q' command. Options: -d Show only directories. The format of the screen is as follows: each line represents a file (or directory), the name of which is right-most. From left the fields are: mode, link count, owner, size, write date and name. See ls(1) for a description of what each of these mean. You move up and down the column immediately left to the filename. The bottom half of the screen is used for displaying files via the 't'ype command. If there are too many files to all fit on one window, more windows are allocated. The 'f' and 'b' commands can be used for stepping forward and backward windows. The last screen line is used as an 'echo' line for displaying error messages and reading arguments. It also displays the full directory name if 'direding' a directory. When in split screen mode, the divider serves also as a 'linear indicator' showing where the current window is relative to the entire list of files. The symbols '(' and ')' denote the window. Square brackets replace '(' and/or ')' when the window is the first and/or last window. A single 'o' is used to represent the window when the window size is small compared to the total number of files. Page 1 (printed 12/15/95) DIRED(1) UNIX System V (Original: June 21 1988) DIRED(1) Commands consist of single characters, with any necessary arguments prompted for, and echoed in the 'echo' line. The only commands which take arguments are '!' (exclamation point), 'r', and 's'. The commands 'G', 'f, 'b', and the commands for moving up and down (e.g.
and '-') may be preceded by a count as in 'vi'. Command list is always under construction. Try a "?" in dired and see what that says for the latest info. Command list: re-prints the dir path name. cancels a sort or a count. ^N j steps to the next file. If this crosses a window boundary, the next window is displayed with a one line overlap. May be preceded by a count. ^ - k ^P steps to previous file. If this crosses a window boundary, the previous window is displayed with a one line overlap. May be preceded by a count ! prompts for a system command to invoke. The command is executed, and confirmation is required before returning to the display. All % characters in the command are replaced with the full pathname of the current entry, and all # chars are replaced with just the trailing filename component (what you see on the screen). . Repeats the previous ! shell command, substituting the current entry for any special chars (%#) in the original command. ^A Applies a command to a list of tagged files (see ^T below). The syntax is the same as a ! command. \ changes from split-screen mode to full-screen mode, or vice-versa. / locates a file matching the given regular expression, where the expressions are as defined for re_comp(3) and re_exec(3). The search occurs in the forward direction. Page 2 (printed 12/15/95) DIRED(1) UNIX System V (Original: June 21 1988) DIRED(1) a aborts out of the current directory. No deletions are done. A aborts completely out of dired, with no deletions. b goes backward a window, leaving a one line overlap. May be preceded by a count. c refreshes the current line. d marks for deletion the current entry. Upon exit and confirmation (or re-reading using the 'R' command), this entry will be deleted. WARNING: this includes directories! If it is a directory, everything in it and underneath it will be removed. An entry that is marked for deletion will also be put in boldface if your terminal can handle it. ^T Tags the current file. Upon exit, the '^A' command, or the 'R' command, you'll be prompted for a command to apply to each of the tagged files in turn. See '!' for details on command syntax. e runs the editor defined in your EDITOR environment variable upon the current file. If EDITOR is not defined, 'vi' is used. However, if the current file is a directory or a symbolic link it is not edited, but rather, dired forks a copy of itself upon that directory. In this manner, you can examine the contents of that directory and thus move down the directory hierarchy. Symbolic links are dired-ed instead of edited because they are frequently directories. E goes up to the next higher level directory. In the case of an argument list of files to dired, it goes to the parent of the directory which contains the current file. f goes forward a window, leaving a one line overlap. May be preceded by a count. shows the current file number, the total number of files, and the percentage through the file. Useful in full screen mode when there is no linear indicator. G goes to the file number given by the preceding count. With no count, goes to the last file as in 'vi'. ? displays a help file. l ^L refreshes the current window. Page 3 (printed 12/15/95) DIRED(1) UNIX System V (Original: June 21 1988) DIRED(1) m runs Berkeley's more program on the current entry. n find the next instance of the previously defined reg expression, searching in the forward direction. N find the next instance of the previously defined reg expression, searching in the reverse direction. p prints the full path name of the current file; embedded control characters are shown with graphics. P prints the current file on the line-printer. It tries using whatever is in the environment variable PRINTPROG and then tries lpr . q exits the program, displaying files marked for deletion and requiring confirmation before deleting them. If no confirmation is given (typing anything other than y), dired goes back to its display. R re-reads the directory or file list. If files are marked for deletion, will first ask for confirmation and then delete them before re-reading. Useful after operations done during shell escapes (e.g. chmod). Q quits dired, with no deletions, pushd's you into the dir of the current file. r s sorts the file list by various fields: name, read date, size, write date. Only the first letter (e.g. n, r, s, or w) is required after giving the r and s commands. s sorts in increasing alphabetic, decreasing size, newest to oldest dates. r reverses the sense of s. For the n, s, and w subcommands, the date field is the write date. For the r subcommand, the date field is the read date. Whenever a sort is done, you are positioned at the top of the list afterwards. A sort can be aborted via . t types the file out to the terminal, which is considerably faster than firing up an editor on the file. If in two-window mode, the bottom window is used, pausing after each screenful. The type-out may be interrupted by Ctrl-C or 'q'. If the file is a symbolic link, the contents of the link are printed (i.e. the name of the file the link is pointing at). T same as 't' but without any pauses. z same as 't' but zcat's the file (for compressed .Z files). Page 4 (printed 12/15/95) DIRED(1) UNIX System V (Original: June 21 1988) DIRED(1) u undeletes the current entry, if it was previously marked for deletion. FILES /usr/local/dired SEE ALSO ls(1) DIAGNOSTICS The error messages are basically self-explanatory. AUTHORS Stuart Mclure Cracraft Enhancements by Jay Lepreau Fixes and enhancements by Charles Hill Full 4.2 support (4.2 support?) by Dave Cohrs @ Wisconsin Enhancements by Larry McVoy @ Wisconsin, Arizona, etc. BUGS Long lines sometimes screw up the 't' display. The full screen mode doesn't work well with 't', it doesn't pause at each screenful. With tagged files, it would be nice if you could apply a single command to all files, instead of one file per command. Page 5 (printed 12/15/95)