DIRED(1)                                                              DIRED(1)



1mNAME0m
       dired - file directory editor

1mSYNOPSIS0m
       1mdired 22m[ 1m-?  22m] [ 1m-b 22m] [ 1m-d 22m] [ 1m-f4m22mfirstfile24m ] [ 1m-F4m22mfirstfile24m ]
             [ 1m-g4m22m[gid-or-groupname]24m ] [ 1m-h 22m] [ 1m-m 22m]
             [ 1m-22m[1ms|r22m][1mc|g|G|i|l|n|N|r|s|t|u|U|w22m] ]
             [ 1m-S 22m] [ 1m-u4m22m[uid-or-username]24m ] [ 1m-V 22m] [ 1m-v 22m]
             [ 1m-w22m[1mf|h|number22m] ] [ 4mdirectory-list24m|4mfile-list24m ]

1mDESCRIPTION0m
       1mdired  22mdisplays  a long-form 1mls22m(1) directory listing on the screen of a
       display terminal and allows you to `edit' and peruse  that  listing  by
       moving  up  and  down,  deleting,  undeleting,  editing, and displaying
       entries.  The 1memacs22m(1) text editor provides a similar capability in  an
       editor  window.   The shell 4mTERM24m variable should be set to the standard
       string which the Berkeley 4mtermcap24m library uses for distinguishing  ter-
       minals.   With no argument, the connected directory is used.  With only
       one argument, if that argument is a directory, it is used.  With multi-
       ple arguments, (or a single non-directory argument) the argument(s) are
       interpreted as filenames.  1mdired 22mthen types `Reading' and gets informa-
       tion  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 gath-
       ered 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  4mq0m
       command.

       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 1mls22m(1) for a
       description of what each of these mean.  You move up and down the  col-
       umn immediately left of the filename.  The bottom half of the screen is
       used for displaying files via the 1mt22mype command.  If there are too  many
       files  to all fit on one window, more windows are allocated.  The 1mf 22mand
       1mb 22mcommands can be used for stepping forward and backward windows.   The
       last  screen  line  is used as an `echo' line for displaying error mes-
       sages 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.

1mOPTIONS0m
       Command-line  options,  which are inherited by recursive invocations of
       1mdired22m, are:

       1m-?     22mDisplay a brief help message on 4mstderr24m and quit with  a  success
              return code.

       1m-b     22mSelect batch mode: 1mdired 22mthen sends its output to 4mstdout24m without
              reading keyboard input, and without colorizing  filenames.   See
              the 1mCOLOR SUPPORT 22msection below for details.

              1mdired  22mwill  normally  select  batch mode automatically when its
              output is not a terminal, but this  option  provides  a  way  to
              force  that for systems where 1mdired 22mis unable to detect non-ter-
              minal output.

              Use  this  option  in  conjunction  with  the  sorting   options
              described below as an alternative to 1mls22m(1).

       1m-d     22mThis  flag is normally not specified by users; 1mdired 22msets it for
              1mdired 22msubprocesses.

       1m-f4m22mfirstfile0m
              Start the output with the specified file on the  first  line  of
              the  display,  but if that file is a directory, prevent attempts
              to edit it recursively with the `e' command.

              This option is ignored in batch mode.

       1m-F4m22mfirstfile0m
              Start the output with the specified file on the  first  line  of
              the display.

              This option is ignored in batch mode.

       1m-g4m22m[gid-or-groupname]0m
              Show  only  files  belonging to the specified group id number or
              group name.  If the number or name is omitted, then the group id
              of the current user is assumed.

       1m-22m[1ms|r22m][1mc|g|G|i|l|n|N|r|s|t|u|U|w22m]
              Forward  or reverse sort by 4minode-change24m 4mdate24m, 4mgroup24m 4mname24m, 4mgroup0m
              4mnumber24m, 4mlink24m 4mcount24m, 4mname24m (lexicographic) , 4mname24m (numeric) , 4mread0m
              4mdate24m,  4msize24m, 4mtype24m, 4muser24m 4mname24m, 4muser24m 4mnumber24m, or 4mwrite24m 4mdate24m respec-
              tively.  ``Normal sort'' is the order most often desired; it  is
              descending  for  size and link counts, from newest to oldest for
              date sorts, and ascending for other sorts.  The  default  is  to
              sort by name.

              For equal sort keys, do a secondary sort to put the filenames in
              ascending order.

              Numeric sorting of filenames with 1m-sN 22mis useful  in  directories
              such as 4m/proc24m and Usenet news trees, where files are named 1, 2,
              3, ....

       1m-h     22mDisplay a brief help message on 4mstderr24m and quit with  a  success
              return code.

       1m-m     22mMonochrome mode: suppress the default colorization of filenames.
              Colorization can still be toggled on and off in the  1mdired  22mses-
              sion  with  the  4mC24m command.  See the 1mCOLOR SUPPORT 22msection below
              for details.

       1m-u4m22m[uid-or-username]0m
              Show only files belonging to the specified  user  id  number  or
              user  name.   If the number or name is omitted, then the user id
              of the current user is assumed.

       1m-S     22mDo not show symbolic link targets, reducing  output  line  width
              requirements.   The  directory  status display then reflects the
              file that the symbolic link points  to,  rather  than  the  link
              itself.   Without  this  option,  the display corresponds to the
              link.

       1m-V     22mSame as 1m-v22m.

       1m-v     22mShow the program version on 4mstderr24m, and quit immediately.

       1m-w[f|h|number]0m
              Use 1mnumber 22mlines for the directory index window,  reserving  the
              other  half for quick file display.  1mf 22mmeans use the full screen
              for the index.  1mh 22mmeans use half of the screen for the index.  1mf0m
              is the default.

1mKEYBOARD COMMANDS0m
       Commands  consist  of  single  characters, with any necessary arguments
       prompted for, and displayed in the echo line.  Several commands take an
       optional non-negative integer count argument, as in 1mvi22m(1).

       Here  are the keyboard commands that control 1mdired22m, organized into sev-
       eral categories:

       1mHelp0m

              1m?22m, 1mh    22mDisplay a help message  summarizing  the  keyboard  com-
                      mands.

       1mQuitting dired0m

              1ma       22mAbort  out  of  the current directory.  No deletions are
                      done.

              1mA       22mAbort completely out of 1mdired22m, with no deletions.

              1mq       22mExit 1mdired22m, displaying files  marked  for  deletion  and
                      requiring confirmation before deleting them.  If no con-
                      firmation is given (typing anything other than 4my24m), 1mdired0m
                      goes back to its display.

              1mQ       22mQuit 1mdired22m, with no deletions.

       1mActions on files0m

              1m!       22mPrompt  for  a system command to invoke.  The command is
                      executed, and confirmation is required before  returning
                      to  the  display.   All  1m% 22mcharacters in the command are
                      replaced with the full pathname of  the  current  entry,
                      and  all  1m#  22mchars  are  replaced with just the trailing
                      filename component (what you see on the screen).

              1m.       22mRepeat the previous 1m!  22mshell command,  substituting  the
                      current entry for any special chars (%#) in the original
                      command.

              1me       22mRun the editor defined in the 4mEDITOR24m  environment  vari-
                      able  upon  the current file.  If 4mEDITOR24m is not defined,
                      1mvi22m(1) is used.  However, if the current file is a direc-
                      tory,  it  is not edited, but rather, 1mdired 22mforks 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.

              1mm       22mRun the program defined by the 4mPAGER24m  environment  vari-
                      able  program  on  the  current  entry.  If 4mPAGER24m is not
                      defined, run 1mmore22m(1).

              1mP       22mPrint the current file on the lineprinter.

              1mt       22mType the file to  the  terminal;  this  is  considerably
                      faster than starting an editor on the file.  In two-win-
                      dow mode, the bottom window is used, pausing after  each
                      screenful.   The type-out may be interrupted by 1m<control0m
                      1mC> 22mor 1mq22m.

              1mT       22mSame as 1mt22m, but without any pauses at end-of-screen.

       1mDeletion and undeletion0m

              1md       22mMark the current entry for deletion.  Upon exit and con-
                      firmation  (or  re-reading  using the 1m`R' 22mcommand), this
                      entry will be deleted.  4mWarning:24m this includes  directo-
                      ries!  If it is a directory, everything in it and under-
                      neath it will be removed.

              1mD       22mMark 4mall24m files for deletion.  (1m`U' 22mundoes this).

              1m~       22mMark files with names ending in ~ for deletion.

              1m#       22mMark files with names beginning with # for deletion.

              1mu       22mUndelete the current entry, if it was previously  marked
                      for deletion.

              1mU       22mCancel all deletion requests.

       1mDisplay0m

              1m<space> 22mRe-print the directory path name.

              1mc       22mRefresh the current line.

              1m\       22mToggle between split-screen mode and full-screen mode.

              1m<control G>0m
                      Show 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.

              1ml22m, 1m<control L>0m
                      Refresh the current window.

              1mp       22mDisplay the full path name of the current file; embedded
                      control characters are shown with graphics.

              1mR       22mRe-read the directory or file list.  If files are marked
                      for  deletion, 1mdired 22mwill first ask for confirmation and
                      then delete them  before  re-reading.   This  is  useful
                      after   operations  done  during  shell  escapes  (e.g.,
                      1mchmod22m(1)).

              1mr22m, 1ms    22mSort the file list by various  fields,  with  the  field
                      selected by the next input character.  If that character
                      is 1m<ESC>22m, then cancel the sort request.  See  the  docu-
                      mentation  of  the  1m-s 22moption above for a description of
                      the sort fields and sort orders.

       1mMiscellaneous0m

              1m<ESC>   22mCancel a sort or a count.

              1mC       22mToggle colorization of filenames.

       1mMoving around0m

              1m<down arrow>22m, 1m<lf>22m,1m^N22m, 1mj0m
                      Step to the next file.  If this crosses a window  bound-
                      ary,  the next window is displayed with a one-line over-
                      lap.  May be preceded by a count.

              1m<up arrow>22m, 1m^22m, 1m-22m, 1mk22m, 1m<backspace>22m, 1m^P0m
                      Step to previous file.  If this crosses a window  bound-
                      ary,  the  previous  window is displayed with a one-line
                      overlap.  May be preceded by a count.

              1m<PageDown>22m, 1m<right arrow>22m, 1mf0m
                      Go forward a window, leaving a one-line overlap.  May be
                      preceded by a count.

              1m<PageUp>22m,1m<left arrow>22m, 1mb0m
                      Go  backward  a window, leaving a one-line overlap.  May
                      be preceded by a count.

              1m<22m, 1m[22m, 1m(22m, 1m{0m
                      Go to the start of the file list.  With an  argument  4mn24m,
                      go 4mn/1024m of the way from the start.

              1m>22m, 1m]22m, 1m)22m, 1m}0m
                      Go  to the end of the file list.  With an argument 4mn24m, go
                      4mn/1024m of the way from the end.

              1mE       22mGo up to the next higher level directory.  In  the  case
                      of  an argument list of files to 1mdired22m, go to the parent
                      of the directory which contains the current file.

              1mG       22mGo to the file number  given  by  the  preceding  count.
                      With no count, go to the last file as in 1mvi22m(1).

              1mM       22mRemember  the  current entry on the mark stack.  You can
                      later return to it with the 1mJ 22m(jump) command.

              1mJ       22mPop the top entry from the mark stack, and jump to it.

              1mL       22mPop the top entry from the view stack, and jump  to  it.
                      Each  screen  display  adds  an entry to the view stack,
                      except for views created by this command, so you can use
                      1mL 22mto display views in reverse order.

       1mSearching0m

              1m/22m<regular-expression>
                      Locate  a file matching the given regular expression, as
                      defined in 1mre_comp22m(3) and 1mre_exec22m(3).  The search is  in
                      the forward direction.  The regular expression is remem-
                      bered for subsequent use by the 1mn 22mand  1mN  22mcommands.   If
                      the regular expression is empty, the last one remembered
                      is used.

              1mn       22mFind the next instance in the forward direction  of  the
                      regular  expression previously-defined by a 4m`/'24m command.

              1mN       22mFind the next instance in the backward direction of  the
                      regular  expression previously-defined by a 4m`/'24m command.

1mCOLOR SUPPORT0m
       From version 4.00, 1mdired 22msupports color coding of files by type and  by
       extension.

       The  color  support is identical to that provided by the GNU 1mls22m(1) com-
       mand: if the terminal type defined by the 4mTERM24m environment variable  is
       known   to  support  color  (i.e.,  is  one  of  4mcon132x2524m,  4mcon132x3024m,
       4mcon132x4324m, 4mcon132x6024m, 4mcon80x2524m, 4mcon80x2824m, 4mcon80x3024m, 4mcon80x4324m, 4mcon80x5024m,
       4mcon80x6024m,  4mconsole24m,  4mlinux24m,  4mvt10024m,  or  4mxterm24m), then built-in defaults
       determine file colors.

       Do not be disappointed if your terminal type is one of the  above,  but
       the  output  is still monochrome: only recent versions of UNIX terminal
       emulators, such as 1mxterm22m(1), contain support for text color beyond  the
       normal  foreground  and background colors.  However, all should have at
       least bold, flashing, underlined, and reverse video capability.

       The defaults can  be  overridden  by  settings  of  the  4mLS_COLORS24m  (or
       4mLS_COLOURS24m)  environment variable; that variable augments, but does not
       eliminate, the internal defaults.  Thus, for  customization,  the  user
       need only supply changed values.

       The  value  of  the  4mLS_COLORS24m variable is a 1mtermcap22m(1)-like capability
       list: a colon-separated list of 4mkey=value24m pairs.  As in  computer  pro-
       gramming languages, when there are repeated assignments to the same key
       name, only the last is effective.

       Keys may be one of these file types or commands:

              4mbd24m     block device,

              4mcd24m     character device,

              4mdi24m     directory,

              4mec24m     end control sequence code (replaces 4mlc+no+rc24m),

              4mex24m     executable file,

              4mfi24m     regular file,

              4mlc24m     left control sequence code,

              4mln24m     symbolic link,

              4mmi24m     missing file (defaults to 4mfi24m),

              4mno24m     normal (non-filename) text,

              4mor24m     orphaned symbolic link (defaults to 4mln24m),

              4mpi24m     named pipe (FIFO),

              4mrc24m     right control sequence code,

              4mso24m     socket.

       Keys may also be of the form 4m*.ext24m to select files by dotted extension.

       Values  are  terminal  color control sequences, usually semicolon-sepa-
       rated lists of numbers, as follows:

               4m024m     restore default color

               4m124m     brighter colors

               4m424m     underlined text

               4m524m     flashing text

               4m724m     reverse video

              4m3024m     black foreground

              4m3124m     red foreground

              4m3224m     green foreground

              4m3324m     yellow (or brown) foreground

              4m3424m     blue foreground

              4m3524m     purple foreground

              4m3624m     cyan foreground

              4m3724m     white (or gray) foreground

              4m4024m     black background

              4m4124m     red background

              4m4224m     green background

              4m4324m     yellow (or brown) background

              4m4424m     blue background

              4m4524m     purple background

              4m4624m     cyan background

              4m4724m     white (or gray) background

       For convenience, here is the same data, sorted by color  names  instead
       of color numbers:

              4m4024m     black background

              4m3024m     black foreground

              4m4424m     blue background

              4m3424m     blue foreground

              4m4624m     cyan background

              4m3624m     cyan foreground

              4m4224m     green background

              4m3224m     green foreground

              4m4524m     purple background

              4m3524m     purple foreground

              4m4124m     red background

              4m3124m     red foreground

              4m4724m     white (or gray) background

              4m3724m     white (or gray) foreground

              4m4324m     yellow (or brown) background

              4m3324m     yellow (or brown) foreground

       Any required special characters in capability values can be represented
       by backslash or caret escape sequences:

              4m\?24m     rubout (ASCII DELete)

              4m\_24m     space

              4m\a24m     alert (ASCII BEL)

              4m\b24m     backspace (ASCII BS)

              4m\e24m     escape (ASCII ESCape)

              4m\f24m     formfeed (ASCII FF)

              4m\n24m     newline (ASCII NL)

              4m\ooo24m   3-octal-digit character value

              4m\r24m     carriage return (ASCII CR)

              4m\t24m     horizontal tab (ASCII HT)

              4m\v24m     vertical tab (ASCII VT)

              4m\xhh24m   2-or-more-hexadecimal-digit character value

              4m^x24m     Control character formed from the five low-order bits  of
                     the character `x'

       Backslash  can also be used to protect other characters, notably, back-
       slash, colon, and equals, from misinterpretation:  `\\'  reduces  to  a
       single `\', and `e:' to a non-separating colon.

       The GNU 1mdircolors22m(1) command can be used to display the default setting
       of 4mLS_COLORS24m used by 1mdired22m.  For convenience, the default is  displayed
       here, but for readability, newlines have been inserted after the colons
       separating 4mkey=value24m pairs, and the pairs have been sorted into ascend-
       ing order:
              4m*.arj=01;31:0m
              4m*.avi=01;37:0m
              4m*.bmp=01;35:0m
              4m*.deb=01;31:0m
              4m*.dl=01;37:0m
              4m*.gif=01;35:0m
              4m*.gl=01;37:0m
              4m*.gz=01;31:0m
              4m*.jpg=01;35:0m
              4m*.lzh=01;31:0m
              4m*.mpg=01;37:0m
              4m*.ppm=01;35:0m
              4m*.tar=01;31:0m
              4m*.taz=01;31:0m
              4m*.tga=01;35:0m
              4m*.tgz=01;31:0m
              4m*.tif=01;35:0m
              4m*.xbm=01;35:0m
              4m*.xpm=01;35:0m
              4m*.Z=01;31:0m
              4m*.z=01;31:0m
              4m*.zip=01;31:0m
              4mbd=40;33;01:0m
              4mcd=40;33;01:0m
              4mdi=01;34:0m
              4mex=01;32:0m
              4mfi=0:0m
              4mlc=\e[:0m
              4mln=01;36:0m
              4mno=0:0m
              4mor=40;31;01:0m
              4mpi=40;33:0m
              4mrc=m:0m
              4mso=01;35:0m

       1mdired  22mwrites  each  filename  to  the  screen  in the form 4m<lc><color-0m
       code><rc><filename><ec>4m.24m  If the 4mec24m command is undefined, the  sequence
       4m<lc><no><rc>24m  is  used instead.  For example, the default setting shown
       above for the 4mdi24m directory file capability, 4m01;3424m, produces bright blue
       text  on the screen background, and the character string that is output
       to the screen is 4m\e[01;34mfilename\e[0m24m.

       If you routinely use colored  screen  backgrounds,  you  should  define
       background,  as  well  as  foreground,  colors in each color capability
       value; otherwise, you may find that  the  color  selected  for  certain
       files  is  difficult,  or  impossible, to see against the colored back-
       ground.

1mDIAGNOSTICS0m
       The error messages should be self-explanatory.

       The exit codes returned to the invoking program are as follows:

              1m0      22msuccess (normal termination);

              1m1      22mfailure (usually accompanied by an explanatory message);

              1m2      22mfailed to open termcap file;

              1m3      22munknown terminal type;

              1m69     22muser requested abort with 4mA24m or 4mQ24m, or else editor  invoca-
                     tion failed.

1mENVIRONMENT VARIABLES0m
       4mLS_COLORS0m
              color capability list; see the 1mCOLOR SUPPORT 22msection above.

       4mLS_COLOURS0m
              alternate  spelling  of  4mLS_COLORS24m,  used  if  that  name is not
              defined.

       4mTERM24m   standard UNIX terminal type.

1mFILES0m
       4m/usr/local/bin/dired24m       Executable program.

       4m/usr/local/src/dired24m       Source directory.

       4m/usr/local/bin/dired.hlp24m   Help file for 1m?  22mand 1mh22m.

1mSEE ALSO0m
       1memacs22m(1), 1mls22m(1).  1mmore22m(1), 1mre_comp22m(3), 1mre_exec22m(3), 1mtermcap22m(1).   1mvi22m(1),
       1mxterm22m(1).

1mAUTHORS0m
       Stuart Mclure Cracraft.

       Enhancements by Jay Lepreau <lepreau@cs.utah.edu>.

       Fixes and enhancements by Charles Hill.

       Regular-expression support code by Tatu Ylonen <ylo@ngs.fi>.

       Many  fixes  and  enhancements, major revision of manual pages, support
       for GNU 4mautoconfigure24m (for simple installation), batch mode, and  color
       support,  by  Nelson H. F. Beebe <beebe@math.utah.edu>, who is the cur-
       rent maintainer of 1mdired22m.

1mAVAILABILITY0m
       1mdired 22mis freely available; its master distribution can be found at

              ftp://ftp.math.utah.edu/pub/misc

       in the file 4mdired-x.yy.tar.gz24m where 4mx.yy24m is the current version.  Other
       distribution formats are usually available in the same location.

       That  site  is  mirrored to several other Internet archives, so you may
       also be able to find it elsewhere on the Internet;  try  searching  for
       the  string  4mdired24m at one or more of the popular Web search sites, such
       as

              http://altavista.digital.com/
              http://www.hotbot.com/
              http://www.stpt.com/
              http://www.yahoo.com/

1mBUGS0m
       If lines wrap or overprint, it is likely that 1mdired  22mhas  an  incorrect
       notion of the screen size.  This can happen on older UNIX systems where
       the kernel does not track screen sizes, but instead, leaves  it  up  to
       the  shell,  which uses environment variables named 4mLINES24m (or 4mROWS24m) and
       4mCOLUMNS24m to record the screen dimensions.  Print those variables  (e.g.,
       4mecho24m  4m$COLUMNS24m),  and  use the 1mstty -a 22mcommand to see the kernel's set-
       tings, if any, correct them if needed, and restart 1mdired22m.

       On some systems, if 1mdired 22mis running under  a  1mscript22m(1)  session,  the
       screen dimensions may be incorrect, and can be reset in the same way as
       above.



Version 4.06                     12 April 2004                        DIRED(1)
