Skip to main content

30.13 Moving Over Subdirectories

When a Dired buffer lists subdirectories, you can use the page motion commands C-x [ and C-x ] to move by entire directories (see Pages).

The following commands move across, up and down in the tree of directories within one Dired buffer. They move to directory header lines, which are the lines that give a directory’s name, at the beginning of the directory’s contents.

C-M-n​

Go to next subdirectory header line, regardless of level (dired-next-subdir).

C-M-p​

Go to previous subdirectory header line, regardless of level (dired-prev-subdir).

C-M-u​

Go up to the parent directory’s header line (dired-tree-up).

C-M-d​

Go down in the directory tree, to the first subdirectory’s header line (dired-tree-down).

<

Move up to the previous directory-file line (dired-prev-dirline). These lines are the ones that describe a directory as a file in its parent directory.

>​

Move down to the next directory-file line (dired-next-dirline).