(dired.info)Subdirectories in Dired


Next: Hiding Directories in Dired Prev: Commands That Do Not Use Marks Up: Dired

Subdirectories in Dired
=======================

Thise section explains how to "insert" (or "expand") subdirectories in
the same Dired buffer and move around in them.

   You can display subdirectories in your Dired buffer by using `-R' in
your Dired listing switches.  But you do not usually want to have a
complete recursive listing in all your Dired buffers.  So there is a
command to insert a single directory:

`i'
     (`dired-maybe-insert-subdir') Insert this subdirectory into the
     same Dired buffer.  If it is already present, just move to it (type
     `l', `dired-do-redisplay' to refresh it).  Else inserts it as `ls
     -lR' would have done.  With a prefix arg, you may edit the ls
     switches used for this listing.  You can add `R' to the switches to
     expand the whole tree starting at this subdirectory.  This function
     takes some pains to conform to `ls -lR' output.  For example, it
     adds the headerline for the inserted subdirectory.

     The mark is dropped before moving, so `C-x C-x' takes you back to
     the old position in the buffer.

   Dired changes the buffer-local value of the variable
`page-delimiter' to `"\n\n"', so that subdirectories become pages.
Thus, the page moving commands `C-x [' and `C-x ]' (`backward-page' and
`forward-page') can be used to move to the beginning (i.e., the
headerlines) of subdirectories.

   In addition, the following commands move around directory-wise,
usually putting you on a file line instead of on a headerline.  For a
mnemonic, note that they all look like rotated versions of each other,
and that they move in the direction they point to.

`<'
     (`dired-prev-dirline') Goto previous directory file line.

`>'
     (`dired-next-dirline') Goto next directory file line.

`^'
     (`dired-up-directory') Dired parent directory.  Tries first to find
     its file line, then its header line in this buffer, then its Dired
     buffer, finally creating a new Dired buffer if necessary.

`v'
     (`dired-view-file') When the current file is not a directory, view
     it.  When file is a directory, tries to go to its subdirectory.

     This command is inverse to the `^' command and it is very
     convenient to use these two commands together.

   The following commands move up and down in the directory tree:

`M-C-u'
     (`dired-tree-up') Go up to the parent directory's headerline.

`M-C-d'
     (`dired-tree-down') Go down in the tree, to the first
     subdirectory's headerline.

   The following commands move forwards and backwards to subdirectory
headerlines:

`M-C-n'
     (`dired-next-subdir') Go to next subdirectory headerline,
     regardless of level.

`M-C-p'
     (`dired-prev-subdir') Go to previous subdirectory headerline,
     regardless of level.


automatically generated by info2www