(emacs)Operating on Files


Next: Shell Commands in Dired Prev: Marks vs Flags Up: Dired

Operating on Files
==================

   This section describes the basic Dired commands to operate on one
file or several files.  All of these commands are capital letters; all
of them use the minibuffer, either to read an argument or to ask for
confirmation, before they act.  All use the following convention to
decide which files to manipulate:

   * If you give the command a numeric prefix argument N, it operates
     on the next N files, starting with the current file.  (If N is
     negative, the command operates on the -N files preceding the
     current line.)

   * Otherwise, if some files are marked with `*', the command operates
     on all those files.

   * Otherwise, the command operates on the current file only.

   Here are the commands that operate on files in this way:

`C NEW RET'
     Copy the specified files (`dired-do-copy').  The argument NEW is
     the directory to copy into, or (if copying a single file) the new
     name.

     If `dired-copy-preserve-time' is non-`nil', then copying with this
     command sets the modification time of the new file to be the same
     as that of the old file.

`R NEW RET'
     Rename the specified files (`dired-do-rename').  The argument NEW
     is the directory to rename into, or (if renaming a single file)
     the new name.

     Dired automatically changes the visited file name of buffers
     associated with renamed files so that they refer to the new names.

`H NEW RET'
     Make hard links to the specified files (`dired-do-hardlink').  The
     argument NEW is the directory to make the links in, or (if making
     just one link) the name to give the link.

`S NEW RET'
     Make symbolic links to the specified files (`dired-do-symlink').
     The argument NEW is the directory to make the links in, or (if
     making just one link) the name to give the link.

`M MODESPEC RET'
     Change the mode (also called "permission bits") of the specified
     files (`dired-do-chmod').  This calls the `chmod' program, so
     MODESPEC can be any argument that `chmod' can handle.

`G NEWGROUP RET'
     Change the group of the specified files to NEWGROUP
     (`dired-do-chgrp').

`O NEWOWNER RET'
     Change the owner of the specified files to NEWOWNER
     (`dired-do-chown').  (On most systems, only the superuser can do
     this.)

     The variable `dired-chown-program' specifies the name of the
     program to use to do the work (different systems put `chown' in
     different places).

`P COMMAND RET'
     Print the specified files (`dired-do-print').  You must specify the
     command to print them with, but the minibuffer starts out with a
     suitable guess made using the variables `lpr-command' and
     `lpr-switches' (the same variables that `lpr-file' uses; *note
     Hardcopy::.).

`Z'
     Compress or uncompress the specified files (`dired-do-compress').
     If the file appears to be a compressed file, it is uncompressed;
     otherwise, it is compressed.

`L'
     Load the specified Emacs Lisp files (`dired-do-load').  Note: Lisp
     Libraries.

`B'
     Byte compile the specified Emacs Lisp files
     (`dired-do-byte-compile').  Note: Byte Compilation
     Compilation.


automatically generated by info2www