Mercurial > emacs
comparison man/dired.texi @ 36149:a1ff91eda21c
Just a short xref for dired-x.
Clean up dired-recursive-deletes and dired-recursive-copies.
Clean up ? in shell command.
Mention M-x locate here.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 17 Feb 2001 16:43:14 +0000 |
parents | c9c43bb7f1d2 |
children | 11db0318031d |
comparison
equal
deleted
inserted
replaced
36148:a2719b6e7a2f | 36149:a1ff91eda21c |
---|---|
9 | 9 |
10 Dired makes an Emacs buffer containing a listing of a directory, and | 10 Dired makes an Emacs buffer containing a listing of a directory, and |
11 optionally some of its subdirectories as well. You can use the normal | 11 optionally some of its subdirectories as well. You can use the normal |
12 Emacs commands to move around in this buffer, and special Dired commands | 12 Emacs commands to move around in this buffer, and special Dired commands |
13 to operate on the files listed. | 13 to operate on the files listed. |
14 | |
15 The Dired-X package provides various extra features for Dired mode. | |
16 @xref{,Dired-X,,dired-x, Dired Extra Version 2 User's Manual}. | |
14 | 17 |
15 @menu | 18 @menu |
16 * Enter: Dired Enter. How to invoke Dired. | 19 * Enter: Dired Enter. How to invoke Dired. |
17 * Commands: Dired Commands. Commands in the Dired buffer. | 20 * Commands: Dired Commands. Commands in the Dired buffer. |
18 * Deletion: Dired Deletion. Deleting files with Dired. | 21 * Deletion: Dired Deletion. Deleting files with Dired. |
27 * Subdirectories in Dired:: Adding subdirectories to the Dired buffer. | 30 * Subdirectories in Dired:: Adding subdirectories to the Dired buffer. |
28 * Subdirectory Motion:: Moving across subdirectories, and up and down. | 31 * Subdirectory Motion:: Moving across subdirectories, and up and down. |
29 * Hiding Subdirectories:: Making subdirectories visible or invisible. | 32 * Hiding Subdirectories:: Making subdirectories visible or invisible. |
30 * Updating: Dired Updating. Discarding lines for files of no interest. | 33 * Updating: Dired Updating. Discarding lines for files of no interest. |
31 * Find: Dired and Find. Using `find' to choose the files for Dired. | 34 * Find: Dired and Find. Using `find' to choose the files for Dired. |
32 * Extra: Dired Extra Features. Dired-X provides more features. | |
33 @end menu | 35 @end menu |
34 | 36 |
35 @node Dired Enter | 37 @node Dired Enter |
36 @section Entering Dired | 38 @section Entering Dired |
37 | 39 |
107 You can flag a file for deletion by moving to the line describing the | 109 You can flag a file for deletion by moving to the line describing the |
108 file and typing @kbd{d} (@code{dired-flag-file-deletion}). The deletion flag is visible as a @samp{D} at | 110 file and typing @kbd{d} (@code{dired-flag-file-deletion}). The deletion flag is visible as a @samp{D} at |
109 the beginning of the line. This command moves point to the next line, | 111 the beginning of the line. This command moves point to the next line, |
110 so that repeated @kbd{d} commands flag successive files. A numeric | 112 so that repeated @kbd{d} commands flag successive files. A numeric |
111 argument serves as a repeat count. | 113 argument serves as a repeat count. |
114 | |
112 @vindex dired-recursive-deletes | 115 @vindex dired-recursive-deletes |
113 The variable @code{dired-recursive-deletes} determines if the delete | 116 The variable @code{dired-recursive-deletes} controls whether the |
114 command will delete non-empty directories recursively. The default | 117 delete command will delete non-empty directories (including their |
115 is to delete only empty directories. | 118 contents). The default is to delete only empty directories. |
116 | 119 |
117 @kindex u @r{(Dired deletion)} | 120 @kindex u @r{(Dired deletion)} |
118 @kindex DEL @r{(Dired)} | 121 @kindex DEL @r{(Dired)} |
119 The files are flagged for deletion rather than deleted immediately to | 122 The files are flagged for deletion rather than deleted immediately to |
120 reduce the danger of deleting a file accidentally. Until you direct | 123 reduce the danger of deleting a file accidentally. Until you direct |
468 @cindex copying files (in Dired) | 471 @cindex copying files (in Dired) |
469 @item C @var{new} @key{RET} | 472 @item C @var{new} @key{RET} |
470 Copy the specified files (@code{dired-do-copy}). The argument @var{new} | 473 Copy the specified files (@code{dired-do-copy}). The argument @var{new} |
471 is the directory to copy into, or (if copying a single file) the new | 474 is the directory to copy into, or (if copying a single file) the new |
472 name. | 475 name. |
473 @vindex dired-recursive-copies | |
474 The variable @code{dired-recursive-copies} determines if directories are | |
475 copied recursively. The default is to not copy recursively. | |
476 | 476 |
477 @vindex dired-copy-preserve-time | 477 @vindex dired-copy-preserve-time |
478 If @code{dired-copy-preserve-time} is non-@code{nil}, then copying with | 478 If @code{dired-copy-preserve-time} is non-@code{nil}, then copying with |
479 this command sets the modification time of the new file to be the same | 479 this command sets the modification time of the new file to be the same |
480 as that of the old file. | 480 as that of the old file. |
481 | |
482 @vindex dired-recursive-copies | |
483 The variable @code{dired-recursive-copies} controls whether | |
484 directories are copied recursively. The default is to not copy | |
485 recursively, which means that directories cannot be copied. | |
481 | 486 |
482 @item D | 487 @item D |
483 @findex dired-do-delete | 488 @findex dired-do-delete |
484 @kindex D @r{(Dired)} | 489 @kindex D @r{(Dired)} |
485 Delete the specified files (@code{dired-do-delete}). Like the other | 490 Delete the specified files (@code{dired-do-delete}). Like the other |
638 | 643 |
639 For example, @kbd{! uudecode @key{RET}} runs @code{uudecode} on each | 644 For example, @kbd{! uudecode @key{RET}} runs @code{uudecode} on each |
640 file. | 645 file. |
641 @end itemize | 646 @end itemize |
642 | 647 |
643 What if you want to run the shell command once for each file but with | 648 What if you want to run the shell command once for each file, with the |
644 the file name inserted in the middle? Or if you want to use the file | 649 file name inserted in the middle? You can use @samp{?} in the command |
645 names in a more complicated fashion? Use a shell loop. For example, | 650 instead of @samp{*}. The current file name is substituted for |
646 this shell command would run @code{uuencode} on each of the specified | 651 @samp{?}. You can use @samp{?} more than once. For instance, here is |
647 files, writing the output into a corresponding @file{.uu} file: | 652 how to uuencode each file, making the output file name by appending |
653 @samp{.uu} to the input file name: | |
654 | |
655 @example | |
656 uuencode ? ? > ?.uu | |
657 @end example | |
658 | |
659 To use the file names in a more complicated fashion, you can use a | |
660 shell loop. For example, this shell command is another way to | |
661 uuencode each file: | |
648 | 662 |
649 @example | 663 @example |
650 for file in *; do uuencode $file $file >$file.uu; done | 664 for file in *; do uuencode $file $file >$file.uu; done |
651 @end example | 665 @end example |
652 | |
653 @noindent | |
654 In simple cases you can instead use @samp{?} in the command. This is | |
655 similar to @samp{*} but the command will be run on each file | |
656 individually. | |
657 | 666 |
658 The working directory for the shell command is the top-level directory | 667 The working directory for the shell command is the top-level directory |
659 of the Dired buffer. | 668 of the Dired buffer. |
660 | 669 |
661 The @kbd{!} command does not attempt to update the Dired buffer to show | 670 The @kbd{!} command does not attempt to update the Dired buffer to show |
999 minibuffer arguments, @var{directory} and @var{find-args}; it runs | 1008 minibuffer arguments, @var{directory} and @var{find-args}; it runs |
1000 @code{find} in @var{directory}, passing @var{find-args} to tell | 1009 @code{find} in @var{directory}, passing @var{find-args} to tell |
1001 @code{find} what condition to test. To use this command, you need to | 1010 @code{find} what condition to test. To use this command, you need to |
1002 know how to use @code{find}. | 1011 know how to use @code{find}. |
1003 | 1012 |
1013 @pindex locate | |
1014 @findex locate | |
1015 @findex locate-with-filter | |
1016 @cindex file database (locate) | |
1017 @vindex locate-command | |
1018 @kbd{M-x locate} provides a similar interface to the @code{locate}. | |
1019 @kbd{M-x locate-with-filter} is similar, but keeps only lines matching | |
1020 a given regular expression. | |
1021 | |
1004 @vindex find-ls-option | 1022 @vindex find-ls-option |
1005 The format of listing produced by these commands is controlled by the | 1023 The format of listing produced by these commands is controlled by the |
1006 variable @code{find-ls-option}, whose default value specifies using | 1024 variable @code{find-ls-option}, whose default value specifies using |
1007 options @samp{-ld} for @code{ls}. If your listings are corrupted, you | 1025 options @samp{-ld} for @code{ls}. If your listings are corrupted, you |
1008 may need to change the value of this variable. | 1026 may need to change the value of this variable. |
1009 | |
1010 @node Dired Extra Features | |
1011 @section Extra Features for Dired | |
1012 | |
1013 The Dired-X package provides various extra features for Dired mode. You | |
1014 can load it with @code{M-x load-library} or customize | |
1015 @code{dired-load-hook} to add @code{dired-require-dired-x}. | |
1016 @xref{,Dired-X,,dired-x, Dired Extra Version 2 User's Manual}. |