Next: Comparing Files Prev: Version Control Up: Files
Listing a File Directory
The file system groups files into "directories". A "directory
listing" is a list of all the files in a directory. Emacs provides
directory listings in brief format (file names only) and verbose format
(sizes, dates, and authors included).
`C-x C-d DIR-OR-PATTERN'
Print a brief directory listing (`list-directory').
`C-u C-x C-d DIR-OR-PATTERN'
Print a verbose directory listing.
The command to display a directory listing is `C-x C-d'
(`list-directory'). It reads using the minibuffer a file name which is
either a directory to be listed or a wildcard-containing pattern for
the files to be listed. For example,
C-x C-d /u2/emacs/etc RET
lists all the files in directory `/u2/emacs/etc'. An example of
specifying a file name pattern is
C-x C-d /u2/emacs/src/*.c RET
Normally, `C-x C-d' prints a brief directory listing containing just
file names. A numeric argument (regardless of value) tells it to print
a verbose listing (like `ls -l').
The text of a directory listing is obtained by running `ls' in an
inferior process. Two Emacs variables control the switches passed to
`ls': `list-directory-brief-switches' is a string giving the switches
to use in brief listings (`"-CF"' by default), and
`list-directory-verbose-switches' is a string giving the switches to
use in a verbose listing (`"-l"' by default).
automatically generated by info2www