summaryrefslogtreecommitdiff
path: root/05/dired.org
blob: e5c380fc57d056d7969fdb4377ad474620527aee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#+TITLE: Dired

Dired is Emacs'file manager.

* Use-cases for Dired

  Run-of-the-mill file operations:

  * Move/rename
  * Copy
  * Delete
  * Create directories
  * Compress

  Batch file actions:

  * Batch editing

* Basic operations

  To open a directory, either visit it like a file -- =C-x f <dir>= --
  or explicitly open the directory with =C-x d <dir>=.

** Refresh directory listing

   Press =g= to refresh the diectory listing.

** Creating a directory
   
   Press =+= to create a new directory.

** Copy files

   To copy a single file, move the pointer onto it, press =C= and
   select a name and path for it to be copied to.

   To copy multiple files, /mark/ all the files that need copying by
   pressing =m= onto them; then press =C= to copy all those files into
   a directory. To unselect all files, press =U=.

** Moving files

   Moving files is similar to /copying/, but press =R= instead of
   =C=. Moving a files is also the way to rename a file as the
   behaviour is identical.

** Deleting files

   Deleting files also works in the same manner as /copying/, but with
   the =D= keybind instead.

** Compress files

   To compress files, select them, then press =c= and choose an
   archive name.

* Batch editing

  Batch renames are done with WDired, a special mode of Dired. Access
  it by pressing =C-x C-q=.

  When in WDired mode, you can edit the dired buffer as though it was
  just text. Hit =C-c C-c= for all your changes to be actually applied
  to the filesystem.