1MC(1) GNU Midnight Commander MC(1)
2
3
4
6 mc - Visual shell for Unix-like systems.
7
9 mc [-abcCdfhPstuUVx] [-l log] [dir1 [dir2]] [-e [file] ...] [-v file]
10
12 GNU Midnight Commander is a directory browser/file manager for
13 Unix-like operating systems.
14
16 -a, --stickchars
17 Disable usage of graphic characters for line drawing.
18
19 -b, --nocolor
20 Force black and white display.
21
22 -c, --color
23 Force color mode, please check the section Colors for more
24 information.
25
26 -C arg, --colors=arg
27 Specify a different color set in the command line. The format
28 of arg is documented in the Colors section.
29
30 --configure-options
31 Display configure options.
32
33 -d, --nomouse
34 Disable mouse support.
35
36 -D N, --debuglevel=N
37 Save the debug level for SMB VFS. N is in 0-10 range.
38
39 -e [file], --edit[=file]
40 Start the internal editor. If the file is specified, open it on
41 startup. See also mcedit (1).
42
43 -f, --datadir
44 Display the compiled-in search paths for Midnight Commander
45 files.
46
47 -F, --datadir-info
48 Display extended info about compiled-in paths for Midnight Com‐
49 mander.
50
51 -g, --oldmouse
52 Force a "normal tracking" mouse mode. Used when running on
53 xterm-capable terminals (tmux/screen).
54
55 -k, --resetsoft
56 Reset softkeys to their default from the termcap/terminfo data‐
57 base. Only useful on HP terminals when the function keys don't
58 work.
59
60 -K file, --keymap=file
61 Specify a name of keymap file in the command line.
62
63 -l file, --ftplog=file
64 Save the ftpfs dialog with the server in file.
65
66 --nokeymap
67 Don't load key bindings from any file, use default hardcoded
68 keys.
69
70 -P file, --printwd=file
71 Print the last working directory to the specified file. This
72 option is not meant to be used directly. Instead, it's used
73 from a special shell script that automatically changes the cur‐
74 rent directory of the shell to the last directory Midnight Com‐
75 mander was in. Source the file /usr/libexec/mc/mc.sh (bash and
76 zsh users) or /usr/libexec/mc.csh (tcsh users) respectively to
77 define mc as an alias to the appropriate shell script.
78
79 -s, --slow
80 Turn on the slow terminal mode, in this mode the program will
81 not draw expensive line drawing characters and will toggle ver‐
82 bose mode off.
83
84 -S arg, --skin=arg
85 Specify a name of skin in the command line. Technology of skins
86 is documented in the Skins section.
87
88 -t, --termcap
89 Used only if the code was compiled with S-Lang and terminfo: it
90 makes Midnight Commander use the value of the TERMCAP variable
91 for the terminal information instead of the information on the
92 system wide terminal database
93
94 -u, --nosubshell
95 Disable use of the concurrent shell (only makes sense if Mid‐
96 night Commander has been built with concurrent shell support).
97
98 -U, --subshell
99 Enable use of the concurrent shell support (only makes sense if
100 the Midnight Commander was built with the subshell support set
101 as an optional feature).
102
103 -v file, --view=file
104 Start the internal viewer to view the specified file. See also
105 mcview (1).
106
107 -V, --version
108 Display the version of the program.
109
110 -x, --xterm
111 Force xterm mode. Used when running on xterm-capable terminals
112 (two screen modes, and able to send mouse escape sequences).
113
114 -X, --no-x11
115 Do not use X11 to get the state of modifiers Alt, Ctrl, Shift
116
117 If both paths are specified, the first path name is the directory to
118 show in the active panel; the second path name is the directory to be
119 shown in the other panel.
120
121 If one path is specified, the path name is the directory to show in the
122 active panel; value of "other_dir" from panels.ini is the directory to
123 be shown in the passive panel.
124
125 If no paths are specified, current directory is shown in the active
126 panel; value of "other_dir" from panels.ini is the directory to be
127 shown in the passive panel.
128
130 The screen of Midnight Commander is divided into four parts. Almost
131 all of the screen space is taken up by two directory panels. By
132 default, the second line from the bottom of the screen is the shell
133 command line, and the bottom line shows the function key labels. The
134 topmost line is the menu bar line. The menu bar line may not be visi‐
135 ble, but appears if you click the topmost line with the mouse or press
136 the F9 key.
137
138 Midnight Commander provides a view of two directories at the same time.
139 One of the panels is the current panel (a selection bar is in the cur‐
140 rent panel). Almost all operations take place on the current panel.
141 Some file operations like Rename and Copy by default use the directory
142 of the unselected panel as a destination (don't worry, they always ask
143 you for confirmation first). For more information, see the sections on
144 the Directory Panels, the Left and Right Menus and the File Menu.
145
146 You can execute system commands from Midnight Commander by simply typ‐
147 ing them. Everything you type will appear on the shell command line,
148 and when you press Enter, Midnight Commander will execute the command
149 line you typed; read the Shell Command Line and Input Line Keys sec‐
150 tions to learn more about the command line.
151
153 Midnight Commander comes with mouse support. It is activated whenever
154 you are running on an xterm(1) terminal (it even works if you take a
155 telnet, ssh or rlogin connection to another machine from the xterm) or
156 if you are running on a Linux console and have the gpm mouse server
157 running.
158
159 When you left click on a file in the directory panels, that file is
160 selected; if you click with the right button, the file is marked (or
161 unmarked, depending on the previous state).
162
163 Double-clicking on a file will try to execute the command if it is an
164 executable program; and if the extension file has a program specified
165 for the file's extension, the specified program is executed.
166
167 Also, it is possible to execute the commands assigned to the function
168 key labels by clicking on them.
169
170 The default auto repeat rate for the mouse buttons is 400 milliseconds.
171 This may be changed to other values by editing the ~/.config/mc/ini
172 file and changing the mouse_repeat_rate parameter.
173
174 If you are running Midnight Commander with the mouse support, you can
175 get the default mouse behavior (cutting and pasting text) by holding
176 down the Shift key.
177
178
180 Some commands in Midnight Commander involve the use of the Control
181 (sometimes labeled CTRL or CTL) and the Meta (sometimes labeled ALT or
182 even Compose) keys. In this manual we will use the following abbrevia‐
183 tions:
184
185 C-<chr>
186 means hold the Control key while typing the character <chr>.
187 Thus C-f would be: hold the Control key and type f.
188
189 Alt-<chr>
190 means hold the Meta or Alt key down while typing <chr>. If
191 there is no Meta or Alt key, type ESC, release it, then type the
192 character <chr>.
193
194 S-<chr>
195 means hold the Shift key down while typing <chr>.
196
197 All input lines in Midnight Commander use an approximation to the GNU
198 Emacs editor's key bindings (default).
199
200 You may redefine key bindings. See redefine hotkey bindings
201
202 for more info. All other key bindings (described in this manual) are
203 relative to default behavior.
204
205
206 There are many sections which tell about the keys. The following are
207 the most important.
208
209 The File Menu section documents the keyboard shortcuts for the commands
210 appearing in the File menu. This section includes the function keys.
211 Most of these commands perform some action, usually on the selected
212 file or the tagged files.
213
214 The Directory Panels section documents the keys which select a file or
215 tag files as a target for a later action (the action is usually one
216 from the file menu).
217
218 The Shell Command Line section list the keys which are used for enter‐
219 ing and editing command lines. Most of these copy file names and such
220 from the directory panels to the command line (to avoid excessive typ‐
221 ing) or access the command line history.
222
223 Input Line Keys are used for editing input lines. This means both the
224 command line and the input lines in the query dialogs.
225
226
227 Redefine hotkey bindings
228 Hotkey bindings may be read from external file (keymap-file). Ini‐
229 tially, Midnight Commander creates key bindings using keymap defined in
230 the source code. Then, two files /usr/share/mc/mc.keymap and
231 /etc/mc/mc.keymap are loaded always, sequentially reassigned key bind‐
232 ings defined earlier. User-defined keymap-file is searched on the fol‐
233 lowing algorithm (to the first one found):
234
235 1) command line option -K <keymap> or --keymap=<keymap>
236 2) Environment variable MC_KEYMAP
237 3) Parameter keymap in section [Midnight-Commander] of config
238 file.
239 4) File ~/.config/mc/mc.keymap
240
241 Command line option, environment variable and parameter in config file
242 may contain the absolute path to the keymap-file (with the extension
243 .keymap or without it). Search of keymap-file will occur in (to the
244 first one found):
245
246 1) ~/.config/mc
247 2) /etc/mc/
248 3) /usr/share/mc/
249
250
251 Miscellaneous Keys
252 Here are some keys which don't fall into any of the other categories:
253
254 Enter if there is some text in the command line (the one at the bottom
255 of the panels), then that command is executed. If there is no
256 text in the command line then if the selection bar is over a
257 directory the Midnight Commander does a chdir(2) to the selected
258 directory and reloads the information on the panel; if the
259 selection is an executable file then it is executed. Finally, if
260 the extension of the selected file name matches one of the
261 extensions in the extensions file then the corresponding command
262 is executed.
263
264 C-l repaint all the information in Midnight Commander.
265
266 C-x c run the Chmod command on a file or on the tagged files.
267
268 C-x o run the Chown command on the current file or on the tagged
269 files.
270
271 C-x l run the hard link command.
272
273 C-x s run the absolute symbolic link command.
274
275 C-x v run the relative symbolic link command. See the File Menu sec‐
276 tion for more information about symbolic links.
277
278 C-x i set the other panel display mode to information.
279
280 C-x q set the other panel display mode to quick view.
281
282 C-x ! execute the External panelize command.
283
284 C-x h run the add directory to hotlist command.
285
286 Alt-! executes the Filtered view command, described in the view com‐
287 mand.
288
289 Alt-? executes the Find file command.
290
291 Alt-c pops up the quick cd dialog.
292
293 C-o when the program is being run in the Linux or FreeBSD console or
294 under an xterm, it will show you the output of the previous com‐
295 mand. When ran on the Linux console, Midnight Commander uses an
296 external program (cons.saver) to handle saving and restoring of
297 information on the screen.
298
299 When the subshell support is compiled in, you can type C-o at any time
300 and you will be taken back to Midnight Commander's main screen, to
301 return to your application just type C-o. If you have an application
302 suspended by using this trick, you won't be able to execute other pro‐
303 grams from Midnight Commander until you terminate the suspended appli‐
304 cation.
305
306 Directory Panels
307 This section lists the keys which operate on the directory panels. If
308 you want to know how to change the appearance of the panels take a look
309 at the section on Left and Right Menus.
310
311 Tab, C-i
312 change the current panel. The old other panel becomes the new
313 current panel and the old current panel becomes the new other
314 panel. The selection bar moves from the old current panel to the
315 new current panel.
316
317 Insert, C-t
318 to tag files you may use the Insert key (the kich1 terminfo
319 sequence). To untag files, just retag a tagged file.
320
321 M-e to change charset of panel you may use M-e (Alt-e). Recoding is
322 made from selected codepage into system codepage. To cancel the
323 recoding, select "No translation" in the dialog of encodings.
324
325 Alt-g, Alt-r, Alt-j
326 used to select the top file in a panel, the middle file and the
327 bottom one, respectively.
328
329 Alt-t toggle the current display listing to show the next display
330 listing format. With this it is possible to quickly switch to
331 brief listing, long listing, user defined listing format, and
332 back to the default.
333
334 C-\ (control-backslash)
335 show the directory hotlist and change to the selected directory.
336
337 + (plus)
338 this is used to select (tag) a group of files. Midnight Comman‐
339 der will prompt for a selection options. When Files only check‐
340 box is on, only files will be selected. If Files only is off,
341 as files as directories will be selected. When Shell Patterns
342 checkbox is on, the regular expression is much like the filename
343 globbing in the shell (* standing for zero or more characters
344 and ? standing for one character). If Shell Patterns is off,
345 then the tagging of files is done with normal regular expres‐
346 sions (see ed (1)). When Case sensitive checkbox is on, the
347 selection will be case sensitive characters. If Case sensitive
348 is off, the case will be ignored.
349
350 \ (backslash)
351 use the "\" key to unselect a group of files. This is the oppo‐
352 site of the Plus key.
353
354 up-key, C-p
355 move the selection bar to the previous entry in the panel.
356
357 down-key, C-n
358 move the selection bar to the next entry in the panel.
359
360 home, a1, Alt-<
361 move the selection bar to the first entry in the panel.
362
363 end, c1, Alt->
364 move the selection bar to the last entry in the panel.
365
366 next-page, C-v
367 move the selection bar one page down.
368
369 prev-page, Alt-v
370 move the selection bar one page up.
371
372 Alt-o If the currently selected file is a directory, load that direc‐
373 tory on the other panel and moves the selection to the next
374 file. If the currently selected file is not a directory, load
375 the parent directory on the other panel and moves the selection
376 to the next file.
377
378 Alt-i make the current directory of the current panel also the current
379 directory of the other panel. Put the other panel to the list‐
380 ing mode if needed. If the current panel is panelized, the
381 other panel doesn't become panelized.
382
383 C-PageUp, C-PageDown
384 only when supported by the terminal: change to ".." and to the
385 currently selected directory respectively.
386
387 Alt-y moves to the previous directory in the history, equivalent to
388 clicking the < with the mouse.
389
390 Alt-u moves to the next directory in the history, equivalent to click‐
391 ing the > with the mouse.
392
393 Alt-Shift-h, Alt-H
394 displays the directory history, equivalent to depressing the 'v'
395 with the mouse.
396
397 Quick search
398 The Quick search mode allows you to perform fast file search in file
399 panel. Press C-s or Alt-s to start a filename search in the directory
400 listing.
401
402 When the search is active, the user input will be added to the search
403 string instead of the command line. If the Show mini-status option is
404 enabled the search string is shown on the mini-status line. When typ‐
405 ing, the selection bar will move to the next file starting with the
406 typed letters. The Backspace or DEL keys can be used to correct typing
407 mistakes. If C-s is pressed again, the next match is searched for.
408
409 If quick search is started with double pressing of C-s, the previous
410 quick search pattern will be used for current search.
411
412 Besides the filename characters, you can also use wildcard characters
413 '*' and '?'.
414
415 Shell Command Line
416 This section lists keys which are useful to avoid excessive typing when
417 entering shell commands.
418
419 Alt-Enter
420 copy the currently selected file name to the command line.
421
422 C-Enter
423 same a Alt-Enter. May not work on remote systems and some ter‐
424 minals.
425
426 C-Shift-Enter
427 copy the full path name of the currently selected file to the
428 command line. May not work on remote systems and some termi‐
429 nals.
430
431 Alt-Tab
432 does the filename, command, variable, username and hostname com‐
433 pletion for you.
434
435 C-x t, C-x C-t
436 copy the tagged files (or if there are no tagged files, the
437 selected file) of the current panel (C-x t) or of the other
438 panel (C-x C-t) to the command line.
439
440 C-x p, C-x C-p
441 the first key sequence copies the current path name to the com‐
442 mand line, and the second one copies the unselected panel's path
443 name to the command line.
444
445 C-q the quote command can be used to insert characters that are oth‐
446 erwise interpreted by Midnight Commander (like the '+' symbol)
447
448 Alt-p, Alt-n
449 use these keys to browse through the command history. Alt-p
450 takes you to the last entry, Alt-n takes you to the next one.
451
452 Alt-h displays the history for the current input line.
453
454 General Movement Keys
455 The help viewer, the file viewer and the directory tree use common code
456 to handle moving. Therefore they accept exactly the same keys. Each of
457 them also accepts some keys of its own.
458
459 Other parts of Midnight Commander use some of the same movement keys,
460 so this section may be of use for those parts too.
461
462 Up, C-p
463 moves one line backward.
464
465 Down, C-n
466 moves one line forward.
467
468 Prev Page, Page Up, Alt-v
469 moves one page up.
470
471 Next Page, Page Down, C-v
472 moves one page down.
473
474 Home, A1
475 moves to the beginning.
476
477 End, C1
478 move to the end.
479
480 The help viewer and the file viewer accept the following keys in addi‐
481 tion the to ones mentioned above:
482
483 b, C-b, C-h, Backspace, Delete
484 moves one page up.
485
486 Space bar
487 moves one page down.
488
489 u, d moves one half of a page up or down.
490
491 g, G moves to the beginning or to the end.
492
493 Input Line Keys
494 The input lines (they are used for the command line and for the query
495 dialogs in the program) accept these keys:
496
497 C-a puts the cursor at the beginning of line.
498
499 C-e puts the cursor at the end of the line.
500
501 C-b, move-left
502 move the cursor one position left.
503
504 C-f, move-right
505 move the cursor one position right.
506
507 Alt-f moves one word forward.
508
509 Alt-b moves one word backward.
510
511 C-h, Backspace
512 delete the previous character.
513
514 C-d, Delete
515 delete the character in the point (over the cursor).
516
517 C-@ sets the mark for cutting.
518
519 C-w copies the text between the cursor and the mark to a kill buffer
520 and removes the text from the input line.
521
522 Alt-w copies the text between the cursor and the mark to a kill buf‐
523 fer.
524
525 C-y yanks back the contents of the kill buffer.
526
527 C-k kills the text from the cursor to the end of the line.
528
529 Alt-p, Alt-n
530 Use these keys to browse through the command history. Alt-p
531 takes you to the last entry, Alt-n takes you to the next one.
532
533 Alt-C-h, Alt-Backspace
534 delete one word backward.
535
536 Alt-Tab
537 does the filename, command, variable, username and hostname com‐
538 pletion for you.
539
540
542 The menu bar pops up when you press F9 or click the mouse on the top
543 row of the screen. The menu bar has five menus: "Left", "File", "Com‐
544 mand", "Options" and "Right".
545
546 The Left and Right Menus allow you to modify the appearance of the left
547 and right directory panels.
548
549 The File Menu lists the actions you can perform on the currently
550 selected file or the tagged files.
551
552 The Command Menu lists the actions which are more general and bear no
553 relation to the currently selected file or the tagged files.
554
555 The Options Menu lists the actions which allow you to customize Mid‐
556 night Commander.
557
558 Left and Right (Above and Below) Menus
559 The outlook of the directory panels can be changed from the Left and
560 Right menus (they are named Above and Below when the horizontal panel
561 split is chosen from the Layout options dialog).
562
563 Listing Format...
564 The listing mode view is used to display a listing of files, there are
565 four different listing formats available: Full, Brief, Long and User.
566 The full directory view shows the file name, the size of the file and
567 the modification time.
568
569 The brief view shows only the file name and it has from 1 up to 9 col‐
570 umns (therefore showing more files unlike other views). The long view
571 is similar to the output of ls -l command. The long view takes the
572 whole screen width.
573
574 If you choose the "User" display format, then you have to specify the
575 display format.
576
577 The user display format must start with a panel size specifier. This
578 may be "half" or "full", and they specify a half screen panel and a
579 full screen panel respectively.
580
581 After the panel size, you may specify how many listings to fit in the
582 panel, side-by-side (in other words: how many times to repeat the
583 fields horizontally). This defaults to 1. You may change this by adding
584 a number from 1 to 9 to the format string.
585
586 After this you add the name of the fields with an optional size speci‐
587 fier. This are the available fields you may display:
588
589 name displays the file name.
590
591 size displays the file size.
592
593 bsize is an alternative form of the size format. It displays the size
594 of the files and for directories it just shows SUB-DIR or
595 UP--DIR.
596
597 type displays a one character wide type field. This character is
598 similar to what is displayed by ls with the -F flag - * for exe‐
599 cutable files, / for directories, @ for links, = for sockets, -
600 for character devices, + for block devices, | for pipes, ~ for
601 symbolic links to directories and ! for stale symlinks (links
602 that point nowhere).
603
604 mark an asterisk if the file is tagged, a space if it's not.
605
606 mtime file's last modification time.
607
608 atime file's last access time.
609
610 ctime file's status change time.
611
612 perm a string representing the current permission bits of the file.
613
614 mode an octal value with the current permission bits of the file.
615
616 nlink the number of links to the file.
617
618 ngid the GID (numeric).
619
620 nuid the UID (numeric).
621
622 owner the owner of the file.
623
624 group the group of the file.
625
626 inode the inode of the file.
627
628 Also you can use following keywords to define the panel layout:
629
630 space a space in the display format.
631
632 | add a vertical line to the display format.
633
634 To force one field to a fixed size (a size specifier), you just add :
635 followed by the number of characters you want the field to have. If
636 the number is followed by the symbol +, then the size specifies the
637 minimal field size - if the program finds out that there is more space
638 on the screen, it will then expand that field.
639
640 For example, the Full display corresponds to this format:
641
642 half type name | size | mtime
643
644 And the Long display corresponds to this format:
645
646 full perm space nlink space owner space group space size space mtime
647 space name
648
649 This is a nice user display format:
650
651 half name | size:7 | type mode:3
652
653 Panels may also be set to the following modes:
654
655 Info The info view display information related to the currently
656 selected file and if possible information about the current file
657 system.
658
659 Tree The tree view is quite similar to the directory tree feature.
660 See the section about it for more information.
661
662 Quick View
663 In this mode, the panel will switch to a reduced viewer that
664 displays the contents of the currently selected file, if you
665 select the panel (with the tab key or the mouse), you will have
666 access to the usual viewer commands.
667
668 Sort Order...
669 The eight sort orders are by name, by extension, by modification time,
670 by access time, and by inode information modification time, by size, by
671 inode and unsorted. In the Sort order dialog box you can choose the
672 sort order and you may also specify if you want to sort in reverse
673 order by checking the reverse box.
674
675 By default directories are sorted before files but this can be changed
676 from the Panel options menu (option Mix all files).
677
678 Filter...
679 The filter command allows you to specify a shell pattern (for example
680 *.tar.gz) which the files must match to be shown. Regardless of the
681 filter pattern, the directories and the links to directories are always
682 shown in the directory panel.
683
684 Reread
685 The reread command reload the list of files in the directory. It is
686 useful if other processes have created or removed files.
687
688 File Menu
689 Midnight Commander uses the F1 - F10 keys as keyboard shortcuts for
690 commands appearing in the file menu. The escape sequences for the
691 function keys are terminfo capabilities kf1 trough kf10. On terminals
692 without function key support, you can achieve the same functionality by
693 pressing the ESC key and then a number in the range 1 through 9 and 0
694 (corresponding to F1 to F9 and F10 respectively).
695
696 The File menu has the following commands (keyboard shortcuts in paren‐
697 theses):
698
699 Help (F1)
700
701 Invokes the built-in hypertext help viewer. Inside the help viewer, you
702 can use the Tab key to select the next link and the Enter key to follow
703 that link. The keys Space and Backspace are used to move forward and
704 backward in a help page. Press F1 again to get the full list of
705 accepted keys.
706
707 Menu (F2)
708
709 Invoke the user menu. The user menu provides an easy way to provide
710 users with a menu and add extra features to Midnight Commander.
711
712 View (F3, F13)
713
714 View the currently selected file. By default this invokes the Internal
715 File Viewer but if the option "Use internal view" is off, it invokes an
716 external file viewer specified by the VIEWER environment variable. If
717 VIEWER is undefined, the PAGER environment variable is tried. If PAGER
718 is also undefined, the "view" command is invoked. If you use F13
719 instead, the viewer will be invoked without doing any formatting or
720 preprocessing to the file.
721
722 See parameters for external viewer for explain how you may specify an
723 extended command line options for external viewers.
724
725 Filtered View (Alt-!)
726
727 This command prompts for a command and its arguments (the argument
728 defaults to the currently selected file name), the output from such
729 command is shown in the internal file viewer.
730
731 Edit (F4, F14)
732
733 Press F4 to edit the highlighted file. Press F14 (usually F14) to
734 start the editor with a new, empty file. Currently they invoke the vi
735 editor, or the editor specified in the EDITOR environment variable, or
736 the Internal File Editor if the use_internal_edit option is on.
737
738 See parameters for external editor for explain how you may specify an
739 extended command line options for external editors.
740
741 Copy (F5, F15)
742
743 Press F5 to pop up an input dialog to copy the currently selected file
744 (or the tagged files, if there is at least one file tagged) to the
745 directory/filename you specify in the input dialog. The destination
746 defaults to the directory in the non-selected panel. Space for destina‐
747 tion file may be preallocated relative to preallocate_space configure
748 option. During this process, you can press C-c or ESC to abort the
749 operation. For details about source mask (which will be usually either
750 * or ^\(.*\)$ depending on setting of Use shell patterns) and possible
751 wildcards in the destination see Mask copy/rename.
752
753 F15 (usually F15) is similar, but defaults to the directory in the
754 selected panel. It always operates on the selected file, regardless of
755 any tagged files.
756
757 On some systems, it is possible to do the copy in the background by
758 clicking on the background button (or pressing Alt-b in the dialog
759 box). The Background Jobs is used to control the background process.
760
761 Link (C-x l)
762
763 Create a hard link to the current file.
764
765 Absolute symlink (C-x s)
766
767 Create a absolute symbolic link to the current file.
768
769 Relative symLink (C-x v)
770
771 Create a relative symbolic link to the current file.
772
773 To those of you who don't know what links are: creating a link to a
774 file is a bit like copying the file, but both the source filename and
775 the destination filename represent the same file image. For example, if
776 you edit one of these files, all changes you make will appear in both
777 files. Some people call links aliases or shortcuts.
778
779 A hard link appears as a real file. After making it, there is no way of
780 telling which one is the original and which is the link. If you delete
781 either one of them the other one is still intact. It is very difficult
782 to notice that the files represent the same image. Use hard links when
783 you don't even want to know.
784
785 A symbolic link is a reference to the name of the original file. If the
786 original file is deleted the symbolic link is useless. It is quite easy
787 to notice that the files represent the same image. Midnight Commander
788 shows an "@"-sign in front of the file name if it is a symbolic link to
789 somewhere (except to directory, where it shows a tilde (~)). The orig‐
790 inal file which the link points to is shown on mini-status line if the
791 Show mini-status option is enabled. Use symbolic links when you want to
792 avoid the confusion that can be caused by hard links.
793
794 When you press "C-x s" Midnight Commander will automatically fill in
795 the complete path+filename of the original file and suggest a name for
796 the link. You can change either one.
797
798 Sometimes you may want to change the absolute path of the original into
799 a relative path. An absolute path starts from the root directory:
800
801 /home/frodo/mc/mc -> /home/frodo/new/mc
802
803 A relative link describes the original file's location starting from
804 the location of the link itself:
805
806 /home/frodo/mc/mc -> ../new/mc
807
808 You can force Midnight Commander to suggest a relative path by pressing
809 "C-x v" instead of "C-x s".
810
811 Rename/Move (F6, F16)
812
813 Press F6 to pop up an input dialog to copy the currently selected file
814 (or the tagged files, if there is at least one file tagged) to the
815 directory/filename you specify in the input dialog. The destination
816 defaults to the directory in the non-selected panel. For more details
817 look at Copy (F5) operation above, most of the things are quite simi‐
818 lar.
819
820 F16 (usually F16) is similar, but defaults to the directory in the
821 selected panel. It always operates on the selected file, regardless of
822 any tagged files.
823
824 On some systems, it is possible to do the copy in the background by
825 clicking on the background button (or pressing Alt-b in the dialog
826 box). The Background Jobs is used to control the background process.
827
828 Mkdir (F7)
829
830 Pop up an input dialog and creates the directory specified.
831
832 Delete (F8)
833
834 Delete the currently selected file or the tagged files in the currently
835 selected panel. During the process, you can press C-c or ESC to abort
836 the operation.
837
838 Quick cd (Alt-c) Use the quick cd command if you have full command line
839 and want to cd somewhere.
840
841 Select group (+)
842
843 This is used to select (tag) a group of files. Midnight Commander will
844 prompt for a selection options. When Files only checkbox is on, only
845 files will be selected. If Files only is off, as files as directories
846 will be selected. When Shell Patterns checkbox is on, the regular
847 expression is much like the filename globbing in the shell (* standing
848 for zero or more characters and ? standing for one character). If
849 Shell Patterns is off, then the tagging of files is done with normal
850 regular expressions (see ed (1)). When Case sensitive checkbox is on,
851 the selection will be case sensitive characters. If Case sensitive is
852 off, the case will be ignored.
853
854 Unselect group (\)
855
856 Used to unselect a group of files. This is the opposite of the Select
857 group command.
858
859 Quit (F10, Shift-F10)
860
861 Terminate Midnight Commander. Shift-F10 is used when you want to quit
862 and you are using the shell wrapper. Shift-F10 will not take you to
863 the last directory you visited with Midnight Commander, instead it will
864 stay at the directory where you started Midnight Commander.
865
866 Quick cd
867 This command is useful if you have a full command line and want to cd
868 somewhere without having to yank and paste the command line. This com‐
869 mand pops up a small dialog, where you enter everything you would enter
870 after cd on the command line and then you press enter. This features
871 all the things that are already in the internal cd command.
872
873 Command Menu
874 The Directory tree command shows a tree figure of the directories.
875
876 The "Find file" command allows you to search for a specific file.
877
878 The "Swap panels" command swaps the contents of the two directory pan‐
879 els.
880
881 The "Switch panels on/off" command shows the output of the last shell
882 command. This works only on xterm and on Linux and FreeBSD console.
883
884 The "Compare directories" command compares the directory panels with
885 each other. You can then use the Copy (F5) command to make the panels
886 identical. There are three compare methods. The quick method compares
887 only file size and file date. The thorough method makes a full
888 byte-by-byte compare. The thorough method is not available if the
889 machine does not support the mmap(2) system call. The size-only com‐
890 pare method just compares the file sizes and does not check the con‐
891 tents or the date times, it just checks the file size.
892
893 The "External panelize" allows you to execute an external program, and
894 make the output of that program the contents of the current panel.
895
896 The "Command history" command shows a list of typed commands. The
897 selected command is copied to the command line. The command history can
898 also be accessed by typing Alt-p or Alt-n.
899
900 The "Directory hotlist" command makes changing of the current directory
901 to often used directories faster.
902
903 The "Screen list" command shows a dialog window with the list of cur‐
904 rently running internal editors, viewers and other MC modules that sup‐
905 port this mode.
906
907 The "Edit extension file" command allows you to specify programs to
908 executed when you try to execute, view, edit and do a bunch of other
909 thing on files with certain extensions (filename endings).
910
911 The "Edit Menu File" command may be used for editing the user menu
912 (which appears by pressing F2).
913
914 Directory Tree
915 The Directory Tree command shows a tree figure of the directories. You
916 can select a directory from the figure and Midnight Commander will
917 change to that directory.
918
919 There are two ways to invoke the tree. The real directory tree command
920 is available from Commands menu. The other way is to select tree view
921 from the Left or Right menu.
922
923 To get rid of long delays, Midnight Commander creates the tree figure
924 by scanning only a small subset of all the directories. If the direc‐
925 tory which you want to see is missing, move to its parent directory and
926 press C-r (or F2).
927
928 You can use the following keys:
929
930 General movement keys are accepted.
931
932 Enter. In the directory tree, exits the directory tree and changes to
933 this directory in the current panel. In the tree view, changes to this
934 directory in the other panel and stays in tree view mode in the current
935 panel.
936
937 C-r, F2 (Rescan). Rescan this directory. Use this when the tree figure
938 is out of date: it is missing subdirectories or shows some subdirecto‐
939 ries which don't exist any more.
940
941 F3 (Forget). Delete this directory from the tree figure. Use this to
942 remove clutter from the figure. If you want the directory back to the
943 tree figure press F2 in its parent directory.
944
945 F4 (Static/Dynamic). Toggle between the dynamic navigation mode
946 (default) and the static navigation mode.
947
948 In the static navigation mode you can use the Up and Down keys to
949 select a directory. All known directories are shown.
950
951 In the dynamic navigation mode you can use the Up and Down keys to
952 select a sibling directory, the Left key to move to the parent direc‐
953 tory, and the Right key to move to a child directory. Only the parent,
954 sibling and children directories are shown, others are left out. The
955 tree figure changes dynamically as you traverse.
956
957 F5 (Copy). Copy the directory.
958
959 F6 (RenMov). Move the directory.
960
961 F7 (Mkdir). Make a new directory below this directory.
962
963 F8 (Delete). Delete this directory from the file system.
964
965 C-s, Alt-s. Search the next directory matching the search string. If
966 there is no such directory these keys will move one line down.
967
968 C-h, Backspace. Delete the last character of the search string.
969
970 Any other character. Add the character to the search string and move
971 to the next directory which starts with these characters. In the tree
972 view you must first activate the search mode by pressing C-s. The
973 search string is shown in the mini status line.
974
975 The following actions are available only in the directory tree. They
976 aren't supported in the tree view.
977
978 F1 (Help). Invoke the help viewer and show this section.
979
980 Esc, F10. Exit the directory tree. Do not change the directory.
981
982 The mouse is supported. A double-click behaves like Enter. See also the
983 section on mouse support.
984
985 Find File
986 The Find File feature first asks for the start directory for the search
987 and the filename to be searched for. By pressing the Tree button you
988 can select the start directory from the directory tree figure.
989
990 The "File name" input field contains a filename pattern to be searched
991 for. It is interpreted as a shell pattern or as a regular expression
992 depending on the state of the "Using shell patterns" checkbox. An empty
993 value is valid and matches any file name.
994
995 The "Content" input field contains a string to search for within the
996 files. Leave this field empty to disable searching file contents.
997
998 Option "Whole words" allows select only those files containing matches
999 that form whole words. Like grep -w.
1000
1001 You can start the search by pressing the OK button. During the search
1002 you can stop from the Stop button and continue from the Start button.
1003
1004 You can browse the filelist with the up and down arrow keys. The Chdir
1005 button will change to the directory of the currently selected file. The
1006 Again button will ask for the parameters for a new search. The Quit
1007 button quits the search operation. The Panelize button will place the
1008 found files to the current directory panel so that you can do addi‐
1009 tional operations on them (view, copy, move, delete and so on). To
1010 return to the normal file listing, change directory to "..".
1011
1012 The 'Enable ignore directories' checkbox and input field below it allow
1013 one to set up the list of directories that should be skip during the
1014 search files (for example, you may want to avoid searches on a CD-ROM
1015 or on a NFS directory that is mounted across a slow link). List compo‐
1016 nents must be separated with a colon, here is an example:
1017
1018 /cdrom:/nfs/wuarchive:/afs
1019
1020 Relative paths are supported also. The following example shows how to
1021 skip special directories of version control systems:
1022 /cdrom:/nfs/wuarchive:/afs:.svn:.git:CVS
1023
1024 Attention: input field can contain a dot (.), this means the current
1025 absolute path.
1026
1027 You may consider using the External panelize command for some opera‐
1028 tions. Find file command is for simple queries only, while using Exter‐
1029 nal panelize you can do as mysterious searches as you would like.
1030
1031 External panelize
1032 The External panelize allows you to execute an external program, and
1033 make the output of that program the contents of the current panel.
1034
1035 For example, if you want to manipulate in one of the panels all the
1036 symbolic links in the current directory, you can use external paneliza‐
1037 tion to run the following command:
1038
1039 find . -type l -print
1040
1041 Upon command completion, the directory contents of the panel will no
1042 longer be the directory listing of the current directory, but all the
1043 files that are symbolic links.
1044
1045 If you want to panelize all of the files that have been downloaded from
1046 your FTP server, you can use this awk command to extract the file name
1047 from the transfer log files:
1048
1049 awk '$9 ~! /incoming/ { print $9 }' < /var/log/xferlog
1050
1051 You may want to save often used panelize commands under a descriptive
1052 name, so that you can recall them quickly. You do this by typing the
1053 command on the input line and pressing Add new button. Then you enter a
1054 name under which you want the command to be saved. Next time, you just
1055 choose that command from the list and do not have to type it again.
1056
1057 Hotlist
1058 The Directory hotlist command shows the labels of the directories in
1059 the directory hotlist. Midnight Commander will change to the directory
1060 corresponding to the selected label. From the hotlist dialog, you can
1061 remove already created label/directory pairs and add new ones. To add
1062 new directories quickly, you can use the Add to hotlist command (C-x
1063 h), which adds the current directory into the directory hotlist, asking
1064 just for the label for the directory.
1065
1066 This makes cd to often used directories faster. You may consider using
1067 the CDPATH variable as described in internal cd command description.
1068
1069 Edit Extension File
1070 This will invoke your editor on the file ~/.config/mc/mc.ext. The for‐
1071 mat of this file following:
1072
1073 All lines starting with # or empty lines are thrown away.
1074
1075 Lines starting in the first column should have following format:
1076
1077 keyword/expr, i.e. everything after the slash until new line is expr.
1078
1079 keyword can be:
1080
1081 shell - expr is an extension (no wildcards). File matches it its name
1082 ends with expr. Example: shell/.tar matches *.tar.
1083
1084 regex - expr is a regular expression. File matches if its name
1085 matches the regular expression.
1086
1087 directory
1088 - expr is a regular expression. File matches if it is a direc‐
1089 tory and its name matches the regular expression.
1090
1091 type - expr is a regular expression. File matches if the output of
1092 file %f without the initial "filename:" part matches regular
1093 expression expr.
1094
1095 default
1096 - matches any file. expr is ignored.
1097
1098 include
1099 - denotes a common section. expr is the name of the section.
1100
1101 Other lines should start with a space or tab and should be of the for‐
1102 mat: keyword=command (with no spaces around =), where keyword should
1103 be: Open (invoked on Enter or double click), View (F3), Edit (F4) or
1104 Include (to add rules from the common section). command is any
1105 one-line shell command, with the simple macro substitution.
1106
1107 Rules are matched from top to bottom, thus the order is important. If
1108 the appropriate action is missing, search continues as if this rule
1109 didn't match (i.e. if a file matches the first and second entry and
1110 View action is missing in the first one, then on pressing F3 the View
1111 action from the second entry will be used). default should match all
1112 the actions.
1113
1114 Background Jobs
1115 This lets you control the state of any background Midnight Commander
1116 process (only copy and move files operations can be done in the back‐
1117 ground). You can stop, restart and kill a background job from here.
1118
1119 Edit Menu File
1120 The user menu is a menu of useful actions that can be customized by the
1121 user. When you access the user menu, the file .mc.menu from the current
1122 directory is used if it exists, but only if it is owned by user or root
1123 and is not world-writable. If no such file found, ~/.config/mc/menu is
1124 tried in the same way, and otherwise mc uses the default system-wide
1125 menu /usr/share/mc/mc.menu.
1126
1127 The format of the menu file is very simple. Lines that start with any‐
1128 thing but space or tab are considered entries for the menu (in order to
1129 be able to use it like a hot key, the first character should be a let‐
1130 ter). All the lines that start with a space or a tab are the commands
1131 that will be executed when the entry is selected.
1132
1133 When an option is selected all the command lines of the option are
1134 copied to a temporary file in the temporary directory (usually
1135 /usr/tmp) and then that file is executed. This allows the user to put
1136 normal shell constructs in the menus. Also simple macro substitution
1137 takes place before executing the menu code. For more information, see
1138 macro substitution.
1139
1140 Here is a sample mc.menu file:
1141
1142 A Dump the currently selected file
1143 od -c %f
1144
1145 B Edit a bug report and send it to root
1146 I=`mktemp ${MC_TMPDIR:-/tmp}/mail.XXXXXX` || exit 1
1147 vi $I
1148 mail -s "Midnight Commander bug" root < $I
1149 rm -f $I
1150
1151 M Read mail
1152 emacs -f rmail
1153
1154 N Read Usenet news
1155 emacs -f gnus
1156
1157 H Call the info hypertext browser
1158 info
1159
1160 J Copy current directory to other panel recursively
1161 tar cf - . | (cd %D && tar xvpf -)
1162
1163 K Make a release of the current subdirectory
1164 echo -n "Name of distribution file: "
1165 read tar
1166 ln -s %d `dirname %d`/$tar
1167 cd ..
1168 tar cvhf ${tar}.tar $tar
1169
1170 = f *.tar.gz | f *.tgz & t n
1171 X Extract the contents of a compressed tar file
1172 tar xzvf %f
1173
1174 Default Conditions
1175
1176 Each menu entry may be preceded by a condition. The condition must
1177 start from the first column with a '=' character. If the condition is
1178 true, the menu entry will be the default entry.
1179
1180 Condition syntax: = <sub-cond>
1181 or: = <sub-cond> | <sub-cond> ...
1182 or: = <sub-cond> & <sub-cond> ...
1183
1184 Sub-condition is one of following:
1185
1186 y <pattern> syntax of current file matching pattern?
1187 (for edit menu only)
1188 f <pattern> current file matching pattern?
1189 F <pattern> other file matching pattern?
1190 d <pattern> current directory matching pattern?
1191 D <pattern> other directory matching pattern?
1192 t <type> current file of type?
1193 T <type> other file of type?
1194 x <filename> is it executable filename?
1195 ! <sub-cond> negate the result of sub-condition
1196
1197 Pattern is a normal shell pattern or a regular expression, according to
1198 the shell patterns option. You can override the global value of the
1199 shell patterns option by writing "shell_patterns=x" on the first line
1200 of the menu file (where "x" is either 0 or 1).
1201
1202 Type is one or more of the following characters:
1203
1204 n not a directory
1205 r regular file
1206 d directory
1207 l link
1208 c character device
1209 b block device
1210 f FIFO (pipe)
1211 s socket
1212 x executable file
1213 t tagged
1214
1215 For example 'rlf' means either regular file, link or fifo. The 't' type
1216 is a little special because it acts on the panel instead of the file.
1217 The condition '=t t' is true if there are tagged files in the current
1218 panel and false if not.
1219
1220 If the condition starts with '=?' instead of '=' a debug trace will be
1221 shown whenever the value of the condition is calculated.
1222
1223 The conditions are calculated from left to right. This means
1224 = f *.tar.gz | f *.tgz & t n
1225 is calculated as
1226 ( (f *.tar.gz) | (f *.tgz) ) & (t n)
1227
1228 Here is a sample of the use of conditions:
1229
1230 = f *.tar.gz | f *.tgz & t n
1231 L List the contents of a compressed tar-archive
1232 gzip -cd %f | tar xvf -
1233
1234 Addition Conditions
1235
1236 If the condition begins with '+' (or '+?') instead of '=' (or '=?') it
1237 is an addition condition. If the condition is true the menu entry will
1238 be included in the menu. If the condition is false the menu entry will
1239 not be included in the menu.
1240
1241 You can combine default and addition conditions by starting condition
1242 with '+=' or '=+' (or '+=?' or '=+?' if you want debug trace). If you
1243 want to use two different conditions, one for adding and another for
1244 defaulting, you can precede a menu entry with two condition lines, one
1245 starting with '+' and another starting with '='.
1246
1247 Comments are started with '#'. The additional comment lines must start
1248 with '#', space or tab.
1249
1250 Options Menu
1251 Midnight Commander has some options that may be toggled on and off in
1252 several dialogs which are accessible from this menu. Options are
1253 enabled if they have an asterisk or "x" in front of them.
1254
1255 The Configuration command pops up a dialog from which you can change
1256 most of settings of Midnight Commander.
1257
1258 The Layout command pops up a dialog from which you specify a bunch of
1259 options how mc looks like on the screen.
1260
1261 The Panel options command pops up a dialog from which you specify
1262 options of file manager panels.
1263
1264 The Confirmation command pops up a dialog from which you specify which
1265 actions you want to confirm.
1266
1267 The Appearance command pops up a dialog from which you specify the
1268 skin.
1269
1270 The Display bits command pops up a dialog from which you may select
1271 which characters is your terminal able to display.
1272
1273 The Learn keys command pops up a dialog from which you test some keys
1274 which are not working on some terminals and you may fix them.
1275
1276 The Virtual FS command pops up a dialog from which you specify some VFS
1277 related options.
1278
1279 The Save setup command saves the current settings of the Left, Right
1280 and Options menus. A small number of other settings is saved, too.
1281
1282 Configuration
1283 The options in this dialog are divided into several groups: "File oper‐
1284 ation options", "Esc key mode", "Pause after run" and "Other options".
1285
1286 File operation options
1287
1288 Verbose operation. This toggles whether the file Copy, Rename and
1289 Delete operations are verbose (i.e., display a dialog box for each
1290 operation). If you have a slow terminal, you may wish to disable the
1291 verbose operation. It is automatically turned off if the speed of your
1292 terminal is less than 9600 bps.
1293
1294 Compute totals. If this option is enabled, Midnight Commander computes
1295 total byte sizes and total number of files prior to any Copy, Rename
1296 and Delete operations. This will provide you with a more accurate
1297 progress bar at the expense of some speed. This option has no effect,
1298 if Verbose operation is disabled.
1299
1300 Classic progressbar. If this option is enabled, the progressbar of
1301 Copy/Move/Delete operations is always grown form left to right. If dis‐
1302 abled, the growing direction of progressbar follows to direction of
1303 Copy/Move/Delete operation: from left panel to right one and vice
1304 versa. Enabled by default.
1305
1306 Mkdir autoname. When you press F7 to create a new directory, the input
1307 line in popup dialog will be filled by name of current file or direc‐
1308 tory in active panel. Disabled by default.
1309
1310 Preallocate space. Preallocate space for whole target file, if possi‐
1311 ble, before copy operation. Disabled by default.
1312
1313 Esc key mode.
1314
1315 By default, Midnight Commander treats the ESC key as a key prefix.
1316 Therefore, you should press Esc code twice to exit a dialog. But there
1317 is a possibility to use a single press of ESC key for that action.
1318
1319 Single press. By default this option is disabled. If you'll enable it,
1320 the ESC key will act as a prefix key for set up time interval (see
1321 Timeout option below), and if no extra keys have arrived, then the ESC
1322 key is interpreted as a cancel key (ESC ESC).
1323
1324 Timeout. This options is used to setup the time interval (in microsec‐
1325 onds) for single press of ESC key. By default, this interval is one
1326 second (1000000 microseconds). Also the timeout can be set via KEY‐
1327 BOARD_KEY_TIMEOUT_US environment variable (also in microseconds), which
1328 has higher priority than Timeout option value.
1329
1330 Pause after run
1331
1332 After executing your commands, Midnight Commander can pause, so that
1333 you can examine the output of the command. There are three possible
1334 settings for this variable:
1335
1336 Never. Means that you do not want to see the output of your command.
1337 If you are using the Linux or FreeBSD console or an xterm, you will be
1338 able to see the output of the command by typing C-o.
1339
1340 On dumb terminals. You will get the pause message on terminals that
1341 are not capable of showing the output of the last command executed (any
1342 terminal that is not an xterm or the Linux console).
1343
1344 Always. The program will pause after executing all of your commands.
1345
1346 Other options
1347
1348 Use internal editor. If this option is enabled, the built-in file edi‐
1349 tor is used to edit files. If the option is disabled, the editor speci‐
1350 fied in the EDITOR environment variable is used. If no editor is spec‐
1351 ified, vi is used. See the section on the internal file editor.
1352
1353 Use internal viewer. If this option is enabled, the built-in file
1354 viewer is used to view files. If the option is disabled, the pager
1355 specified in the PAGER environment variable is used. If no pager is
1356 specified, the view command is used. See the section on the internal
1357 file viewer.
1358
1359 Ask new file name. If this option is enabled, file name is asked
1360 before open new file in editor.
1361
1362 Auto menus. If this option is enabled, the user menu will be invoked
1363 at startup. Useful for building menus for non-unixers.
1364
1365 Drop down menus. When this option is enabled, the pull down menus will
1366 be activated as soon as you press the F9 key. Otherwise, you will only
1367 get the menu title, and you will have to activate the menu either with
1368 the arrow keys or with the hotkeys. It is recommended if you are using
1369 hotkeys.
1370
1371 Shell Patterns. By default the Select, Unselect and Filter commands
1372 will use shell-like regular expressions. The following conversions are
1373 performed to achieve this: the '*' is replaced by '.*' (zero or more
1374 characters); the '?' is replaced by '.' (exactly one character) and
1375 '.' by the literal dot. If the option is disabled, then the regular
1376 expressions are the ones described in ed(1).
1377
1378 Complete: show all. By default, Midnight Commander pops up all possi‐
1379 ble completions if the completion is ambiguous only when you press
1380 Alt-Tab for the second time. For the first time, it just completes as
1381 much as possible and beeps in the case of ambiguity. Enable this
1382 option if you want to see all possible completions even after pressing
1383 Alt-Tab the first time.
1384
1385 Rotating dash. If this option is enabled, the Midnight Commander shows
1386 a rotating dash in the upper right corner as a work in progress indica‐
1387 tor.
1388
1389 Cd follows links. This option, if set, causes Midnight Commander to
1390 follow the logical chain of directories when changing current directory
1391 either in the panels, or using the cd command. This is the default
1392 behavior of bash. When unset, Midnight Commander follows the real
1393 directory structure, so cd .. if you've entered that directory through
1394 a link will move you to the current directory's real parent and not to
1395 the directory where the link was present.
1396
1397 Safe delete. If this option is enabled, deleting files and directory
1398 hotlist entries unintentionally becomes more difficult. The default
1399 selection in the confirmation dialogs for deletion changes from Yes to
1400 No. This option is disabled by default.
1401
1402 Safe overwrite. If this option is enabled, overwriting files uninten‐
1403 tionally becomes more difficult. The default selection in the over‐
1404 write confirmation dialog changes from Yes to No. This option is dis‐
1405 abled by default.
1406
1407 Auto save setup. If this option is enabled, when you exit Midnight
1408 Commander, the configurable options of Midnight Commander are saved in
1409 the ~/.config/mc/ini file.
1410
1411 Layout
1412 The layout dialog gives you a possibility to change the general layout
1413 of screen. The options in this dialog are divided into several groups:
1414 "Panel split", "Console output" and "Other options".
1415
1416 Panel split
1417
1418 The rest of the screen area is used for the two directory panels. You
1419 can specify whether the area is split to the panels in Vertical or Hor‐
1420 izontal direction. Panel layout can be changed using Alt-, (Alt-comma)
1421 shortcut.
1422
1423 Equal split. By default, panels have equal sizes. Using this option
1424 you can specify an unequal split.
1425
1426 Console output
1427
1428 On the Linux or FreeBSD console you can specify how many lines are
1429 shown in the output window. This option is available if Midnight Com‐
1430 mander runs on native console only.
1431
1432 Other options
1433
1434 Menu bar visible. If enabled, main menu of Midnight Commander is
1435 always visible on the top row of screen above panels. Enabled by
1436 default.
1437
1438 Command prompt. If enabled, command line is available. Enabled by
1439 default.
1440
1441 Keybar visible. If enabled, 10 labels associated with F1-F10 keys are
1442 located at the bottom row of screen. Enabled by default.
1443
1444 Hintbar visible. If enabled, the one-line hints are visible below pan‐
1445 els. Enabled by default.
1446
1447 XTerm window title. When run in a terminal emulator for X11, Midnight
1448 Commander sets the terminal window title to the current working direc‐
1449 tory and updates it when necessary. If your terminal emulator is bro‐
1450 ken and you see some incorrect output on startup and directory change,
1451 turn off this option. Enabled by default.
1452
1453 Show free space. If enabled, free space and total space of current
1454 file system is shown at the bottom frame of panel. Enabled by default.
1455
1456 Panel options
1457 Main panel options
1458
1459 Show mini-status. If enabled, one line of status information about the
1460 currently selected item is shown at the bottom of the panels. Enabled
1461 by default.
1462
1463 Use SI size units. If this option is enabled, Midnight Commander will
1464 use SI prefixes (base 10) when displaying any byte sizes. If disabled
1465 (default), Midnight Commander will use IEC prefixes (base 2).
1466
1467 Mix all files. If this option is enabled, all files and directories
1468 are shown mixed together. If the option is disabled (default), direc‐
1469 tories (and links to directories) are shown at the beginning of the
1470 listing, and other files below.
1471
1472 Show backup files. If enabled, Midnight Commander will show files end‐
1473 ing with a tilde. Otherwise, they won't be shown (like GNU's ls option
1474 -B). Enabled by default.
1475
1476 Show hidden files. If enabled, Midnight Commander will show all files
1477 that start with a dot (like ls -a). Disabled by default.
1478
1479 Fast directory reload. If this option is enabled, Midnight Commander
1480 will use a trick to determine if the directory contents have changed.
1481 The trick is to reload the directory only if the i-node of the direc‐
1482 tory has changed; this means that reloads only happen when files are
1483 created or deleted. If what changes is the i-node for a file in the
1484 directory (file size changes, mode or owner changes, etc) the display
1485 is not updated. In these cases, if you have the option on, you have to
1486 rescan the directory manually (with C-r). Disabled by default.
1487
1488 Mark moves down. If enabled, the selection bar will move down when you
1489 mark a file (with Insert key). Enabled by default.
1490
1491 Reverse files only. Allow revert selection of files only. Enabled by
1492 default. If enabled, the reverse selection is applied to files only,
1493 not to directories. The selection of directories is untouched. If off,
1494 the reverse selection is applied to files as well to directories: all
1495 unselected items become selected, and vice versa.
1496
1497 Simple swap. If both panels contain file listing, simple swap means
1498 that panels exchange its screen positions: left panel become right one,
1499 and vice versa. If this option is unchecked, file listing panels
1500 exchange its content keeping listing format and sort options. Unchecked
1501 by default.
1502
1503 Auto save panels setup. If this option is enabled, when you exit Mid‐
1504 night Commander, the current settings of panels are saved in the
1505 ~/.config/mc/panels.ini file. Disabled by default.
1506
1507 Navigation
1508
1509 Lynx-like motion. If this option is enabled, you may use the arrows
1510 keys to automatically chdir if the current selection is a subdirectory
1511 and the shell command line is empty. By default, this setting is off.
1512
1513 Page scrolling. If set (the default), panel will scroll by half the
1514 display when the cursor reaches the end or the beginning of the panel,
1515 otherwise it will just scroll a file at a time.
1516
1517 Center scrolling. If set, panel will scroll when the cursor reaches
1518 the middle of the panel column, only hitting the top or bottom of the
1519 panel when actually on the first or last file. This behavior applies
1520 when scrolling one file at a time, and does not apply to the page
1521 up/down keys.
1522
1523 Mouse page scrolling. Controls whenever scrolling with the mouse wheel
1524 is done by pages or line by line on the panels.
1525
1526 File highlight
1527
1528 You can specify whether permissions and file types should be high‐
1529 lighted with distinctive Colors. If the permission highlighting is
1530 enabled, the parts of the perm and mode display fields which apply to
1531 the user running Midnight Commander are highlighted with the color
1532 defined by the selected keyword. If the file type highlighting is
1533 enabled, file names are colored according to rules described in
1534 /etc/mc/filehighlight.ini file. See Filenames Highlight for more info.
1535
1536 Quick search
1537
1538 You can specify how the Quick search mode should work: case insensi‐
1539 tively, case sensitively or be matched to the panel sort order: case
1540 sensitive or not.
1541
1542 Confirmation
1543 In this dialog you configure the confirmation options for file dele‐
1544 tion, overwriting files, execution by pressing enter, quitting the pro‐
1545 gram, directory hotlist entries deletion and history cleanup.
1546
1547 Appearance
1548 In this dialog you can select the skin to be used.
1549
1550 See the Skins section for technical details about the skin definition
1551 files.
1552
1553 Display bits
1554 This is used to configure the range of visible characters on the
1555 screen. This setting may be 7-bits if your terminal/curses supports
1556 only seven output bits, ISO-8859-1 displays all the characters in the
1557 ISO-8859-1 map and full 8 bits is for those terminals that can display
1558 full 8 bit characters.
1559
1560 Learn keys
1561 This dialog allows you to test and redefine functional keys, cursor
1562 arrows and some other keys to make them work properly on your terminal.
1563 They often don't, since many terminal databases are incomplete or bro‐
1564 ken.
1565
1566 You can move around with the Tab key and with the vi moving keys ('h'
1567 left, 'j' down, 'k' up and 'l' right). Once you press any cursor move‐
1568 ment key and it is recognized, you can use that key as well.
1569
1570 You can test keys just by pressing each of them. When you press a key
1571 and it is recognized properly, OK should appear next to the name of
1572 that key. Once a key is marked OK it starts working as usually, e.g.
1573 F1 pressed the first time will just check that the F1 key works, but
1574 after that it will show help. The same applies to the arrow keys. The
1575 Tab key should be working always.
1576
1577 If some keys do not work properly then you won't see OK appear after
1578 pressing one of these. Then you may want to redefine it. Do it by
1579 pressing the button with the name of that key (either by the mouse or
1580 by Enter or Space after selecting the button with Tab or arrows). Then
1581 a message box will appear asking you to press that key. Do it and wait
1582 until the message box disappears. If you want to abort, just press
1583 Escape once and wait.
1584
1585 When you finish with all the keys, you can Save them. The definitions
1586 for the keys you have redefined will be written into the [termi‐
1587 nal:TERM] section of your ~/.config/mc/ini file (where TERM is the name
1588 of your current terminal). The definitions of the keys that were
1589 already working properly are not saved.
1590
1591 Virtual FS
1592 This option gives you control over the settings of the Virtual File
1593 System.
1594
1595 Midnight Commander keeps in memory the information related to some of
1596 the virtual file systems to speed up the access to the files in the
1597 file system (for example, directory listings fetched from FTP servers).
1598
1599 Also, in order to access the contents of compressed files (for example,
1600 compressed tar files), Midnight Commander needs to create temporary
1601 uncompressed files on your disk.
1602
1603 Since both the information in memory and the temporary files on disk
1604 take up resources, you may want to tune the parameters of the cached
1605 information to decrease your resource usage or to maximize the speed of
1606 access to frequently used file systems.
1607
1608 Because of the format of the tar archives, the Tar filesystem needs to
1609 read the whole file just to load the file entries. Since most tar
1610 files are usually kept compressed (plain tar files are species in
1611 extinction), the tar file system has to uncompress the file on the disk
1612 in a temporary location and then access the uncompressed file as a reg‐
1613 ular tar file.
1614
1615 Now, since we all love to browse files and tar files all over the disk,
1616 it's common that you will leave a tar file and then re-enter it later.
1617 Since decompression is slow, Midnight Commander will cache the informa‐
1618 tion in memory for a limited time. When the timeout expires, all the
1619 resources associated with the file system are released. The default
1620 timeout is set to one minute.
1621
1622 The FTP File System (ftpfs) allows you to browse directories on remote
1623 FTP servers. It has several options.
1624
1625 ftp anonymous password is the password used when you login as "anony‐
1626 mous". Some sites require a valid e-mail address. On the other hand,
1627 you probably don't want to give your real e-mail address to untrusted
1628 sites, especially if you are not using spam filtering.
1629
1630 ftpfs keeps the directory listing it fetches from a FTP server in a
1631 cache. The cache expire time is configurable with the ftpfs directory
1632 cache timeout option. A low value for this option may slow down every
1633 operation on the ftpfs because every operation would require sending a
1634 request to the FTP server.
1635
1636 You can define an FTP proxy host for doing FTP. Note that most modern
1637 firewalls are fully transparent at least for passive FTP (see below),
1638 so FTP proxies are considered obsolete.
1639
1640 If Always use ftp proxy is not set, you can use the exclamation sign to
1641 enable proxy for certain hosts. See FTP File System for examples.
1642
1643 If this option is set, the program will do two things: consult the
1644 /usr/lib/mc/mc.no_proxy file for lines containing host names that are
1645 local (if the host name starts with a dot, it is assumed to be a
1646 domain) and to assume that any hostnames without dots in their names
1647 are directly accessible. All other hosts will be accessed through the
1648 specified FTP proxy.
1649
1650 You can enable using ~/.netrc file, which keeps login names and pass‐
1651 words for ftp servers. See netrc (5) for the description of the .netrc
1652 format.
1653
1654 Use passive mode enables using FTP passive mode, when the connection
1655 for data transfer is initiated by the client, not by the server. This
1656 option is recommended and enabled by default. If this option is turned
1657 off, the data connection is initiated by the server. This may not work
1658 with some firewalls.
1659
1660 Save Setup
1661 At startup, Midnight Commander tries to load initialization information
1662 from the ~/.config/mc/ini file. If this file doesn't exist, the sys‐
1663 tem-wide file /etc/mc/mc.ini is used. If this file doesn't exist, the
1664 system-wide file /usr/share/mc/mc.ini is used. If this file doesn't
1665 exist, MC uses the default settings.
1666
1667 The Save Setup command creates the ~/.config/mc/ini file by saving the
1668 current settings of the Left, Right and Options menus.
1669
1670 If you activate the auto save setup option, MC will always save the
1671 current settings when exiting.
1672
1673 There also exist settings which can't be changed from the menus. To
1674 change these settings you have to edit the setup file with your
1675 favorite editor. See the section on Special Settings for more informa‐
1676 tion.
1677
1678
1680 You may execute commands by typing them directly in Midnight Comman‐
1681 der's input line, or by selecting the program you want to execute with
1682 the selection bar in one of the panels and hitting Enter.
1683
1684 If you press Enter over a file that is not executable, Midnight Comman‐
1685 der checks the extension of the selected file against the extensions in
1686 the Extensions File. If a match is found then the code associated with
1687 that extension is executed. A very simple macro expansion takes place
1688 before executing the command.
1689
1690 The cd internal command
1691 The cd command is interpreted by Midnight Commander, it is not passed
1692 to the command shell for execution. Thus it may not handle all of the
1693 nice macro expansion and substitution that your shell does, although it
1694 does some of them:
1695
1696 Tilde substitution. The (~) will be substituted with your home direc‐
1697 tory, if you append a username after the tilde, then it will be substi‐
1698 tuted with the login directory of the specified user.
1699
1700 For example, ~guest is the home directory for the user guest, while
1701 ~/guest is the directory guest in your home directory.
1702
1703 Previous directory. You can jump to the directory you were previously
1704 by using the special directory name '-' like this: cd -
1705
1706 CDPATH directories. If the directory specified to the cd command is
1707 not in the current directory, then Midnight Commander uses the value in
1708 the environment variable CDPATH to search for the directory in any of
1709 the named directories.
1710
1711 For example you could set your CDPATH variable to ~/src:/usr/src,
1712 allowing you to change your directory to any of the directories inside
1713 the ~/src and /usr/src directories, from any place in the file system
1714 by using its relative name (for example cd linux could take you to
1715 /usr/src/linux).
1716
1717 Macro Substitution
1718 When accessing a user menu, or executing an extension dependent com‐
1719 mand, or running a command from the command line input, a simple macro
1720 substitution takes place.
1721
1722 The macros are:
1723
1724 %i The indent of blank space, equal the cursor column position.
1725 For edit menu only.
1726
1727 %y The syntax type of current file. For edit menu only.
1728
1729 %k The block file name.
1730
1731 %e The error file name.
1732
1733 %m The current menu name.
1734
1735 %f and %p
1736 In file manager user menu: the current file name in selected
1737 panel. In mcedit user menu: the name of opened file.
1738
1739 %x The extension of current file name.
1740
1741 %b The current file name without extension.
1742
1743 %d The current directory name.
1744
1745 %F The current file in the unselected panel.
1746
1747 %D The directory name of the unselected panel.
1748
1749 %t The currently tagged files.
1750
1751 %T The tagged files in the unselected panel.
1752
1753 %u and %U
1754 Similar to the %t and %T macros, but in addition the files are
1755 untagged. You can use this macro only once per menu file entry
1756 or extension file entry, because next time there will be no
1757 tagged files.
1758
1759 %s and %S
1760 The selected files: The tagged files if there are any. Otherwise
1761 the current file.
1762
1763 %cd This is a special macro that is used to change the current
1764 directory to the directory specified in front of it. This is
1765 used primarily as an interface to the Virtual File System.
1766
1767 %view This macro is used to invoke the internal viewer. This macro
1768 can be used alone, or with arguments. If you pass any arguments
1769 to this macro, they should be enclosed in brackets.
1770
1771 The arguments are: ascii to force the viewer into ascii mode;
1772 hex to force the viewer into hex mode; nroff to tell the viewer
1773 that it should interpret the bold and underline sequences of
1774 nroff; unformatted to tell the viewer to not interpret nroff
1775 commands for making the text bold or underlined.
1776
1777 %% The % character
1778
1779 %{some text}
1780 Prompt for the substitution. An input box is shown and the text
1781 inside the braces is used as a prompt. The macro is substituted
1782 by the text typed by the user. The user can press ESC or F10 to
1783 cancel. This macro doesn't work on the command line yet.
1784
1785 %var{ENV:default}
1786 If environment variable ENV is unset, the default is substi‐
1787 tuted. Otherwise, the value of ENV is substituted.
1788
1789 The subshell support
1790 The subshell support is a compile time option, that works with the
1791 shells: bash, ash (BusyBox and Debian), tcsh, zsh and fish.
1792
1793 When the subshell support is active, Midnight Commander will spawn a
1794 concurrent copy of your shell (the one defined in the SHELL variable
1795 and if it is not defined, then the one in the /etc/passwd file) and run
1796 it in a pseudo terminal, instead of invoking a new shell each time you
1797 execute a command, the command will be passed to the subshell as if you
1798 had typed it. This also allows you to change the environment vari‐
1799 ables, use shell functions and define aliases that are valid until you
1800 quit Midnight Commander.
1801
1802 bash users may specify startup commands in ~/.local/share/mc/bashrc
1803 (fallback ~/.bashrc) and special keyboard maps in
1804 ~/.local/share/mc/inputrc (fallback ~/.inputrc).
1805
1806 ash/dash users (BusyBox or Debian) may specify startup commands in
1807 ~/.local/share/mc/ashrc (fallback ~/.profile).
1808
1809 tcsh, zsh, fish users cannot specify mc-specific startup commands at
1810 present. They have to rely on shell-specific startup files.
1811
1812 The following paragraphs are relevant only when the subshell support is
1813 active:
1814
1815 You can suspend applications at any time with the sequence C-o and jump
1816 back to Midnight Commander, if you interrupt an application, you will
1817 not be able to run other external commands until you quit the applica‐
1818 tion you interrupted.
1819
1820 The basic prompt displayed by Midnight Commander is of the form
1821 "user@host:current_path$ ". When using a capable shell, like Bash, the
1822 prompt displayed by Midnight Commander will be the same prompt that you
1823 are currently using in your shell.
1824
1825 (There's a known problem when using fish: the prompt is displayed only
1826 in full screen mode (Ctrl-o), not when the panels are visible.)
1827
1828 The OPTIONS section has more information on how you can control sub‐
1829 shell usage (-U/-u). Furthermore, to set a specific subshell different
1830 from your current SHELL variable or login shell defined in /etc/passwd,
1831 you may call MC like this: SHELL=/bin/myshell mc
1832
1834 The Chmod window is used to change the attribute bits in a group of
1835 files and directories. It can be invoked with the C-x c key combina‐
1836 tion.
1837
1838 The Chmod window has two parts - Permissions and File.
1839
1840 In the File section are displayed the name of the file or directory and
1841 its permissions in octal form, as well as its owner and group.
1842
1843 In the Permissions section there is a set of check buttons which corre‐
1844 spond to the file attribute bits. As you change the attribute bits,
1845 you can see the octal value change in the File section.
1846
1847 To move between the widgets (buttons and check buttons) use the arrow
1848 keys or the Tab key. To change the state of the check buttons or to
1849 select a button use Space. You can also use the hotkeys on the buttons
1850 to quickly activate them. Hotkeys are shown as highlighted letters on
1851 the buttons.
1852
1853 To set the attribute bits, use the Enter key.
1854
1855 When working with a group of files or directories, you just click on
1856 the bits you want to set or clear. Once you have selected the bits you
1857 want to change, you select one of the action buttons (Set marked or
1858 Clear marked).
1859
1860 Finally, to set the attributes exactly to those specified, you can use
1861 the [Set all] button, which will act on all the tagged files.
1862
1863 [Marked all] set only marked attributes to all selected files
1864
1865 [Set marked] set marked bits in attributes of all selected files
1866
1867 [Clean marked] clear marked bits in attributes of all selected files
1868
1869 [Set] set the attributes of one file
1870
1871 [Cancel] cancel the Chmod command
1872
1874 The Chown command is used to change the owner/group of a file. The hot
1875 key for this command is C-x o.
1876
1878 The Advanced Chown command is the Chmod and Chown command combined into
1879 one window. You can change the permissions and owner/group of files at
1880 once.
1881
1883 When you copy, move or delete files, Midnight Commander shows the file
1884 operations dialog. It shows the files currently being processed and
1885 uses up to three progress bars. The file bar indicates the percentage
1886 of the current file that has been processed so far. The count bar
1887 shows how many of the tagged files have been handled. The bytes bar
1888 indicates the percentage of the total size of the tagged files that has
1889 been handled. If the verbose option is off, the file and bytes bars
1890 are not shown.
1891
1892 There are two buttons at the bottom of the dialog. Pressing the Skip
1893 button will skip the rest of the current file. Pressing the Abort but‐
1894 ton will abort the whole operation, the rest of the files are skipped.
1895
1896 There are three other dialogs which you can run into during the file
1897 operations.
1898
1899 The error dialog informs about error conditions and has three choices.
1900 Normally you select either the Skip button to skip the file or the
1901 Abort button to abort the operation altogether. You can also select
1902 the Retry button if you fixed the problem from another terminal.
1903
1904 The replace dialog is shown when you attempt to copy or move a file on
1905 the top of an existing file. The dialog shows the dates and sizes of
1906 the both files. Press the Yes button to overwrite the file, the No
1907 button to skip the file, the All button to overwrite all the files, the
1908 None button to never overwrite and the Update button to overwrite if
1909 the source file is newer than the target file. You can abort the whole
1910 operation by pressing the Abort button.
1911
1912 The recursive delete dialog is shown when you try to delete a directory
1913 which is not empty. Press the Yes button to delete the directory
1914 recursively, the No button to skip the directory, the All button to
1915 delete all the directories and the None button to skip all the
1916 non-empty directories. You can abort the whole operation by pressing
1917 the Abort button. If you selected the Yes or All button you will be
1918 asked for a confirmation. Type "yes" only if you are really sure you
1919 want to do the recursive delete.
1920
1921 If you have tagged files and perform an operation on them only the
1922 files on which the operation succeeded are untagged. Failed and skipped
1923 files are left tagged.
1924
1926 The copy/move operations let you translate the names of files in an
1927 easy way. To do it, you have to specify the correct source mask and
1928 usually in the trailing part of the destination specify some wildcards.
1929 All the files matching the source mask are copied/renamed according to
1930 the target mask. If there are tagged files, only the tagged files
1931 matching the source mask are renamed.
1932
1933 There are other options which you can set:
1934
1935 Follow links
1936
1937 determines whether make the symlinks and hardlinks in the source direc‐
1938 tory (recursively in subdirectories) new links in the target directory
1939 or whether would you like to copy their content.
1940
1941 Dive into subdirs
1942
1943 determines the behavior when the source directory is about to be
1944 copied, but the target directory already exists. The default action is
1945 to copy the contents of the source directory into the target directory.
1946 Enabling this option causes copying the source directory itself into
1947 the target directory.
1948
1949 For example, you want to copy directory /foo containing file bar to
1950 /bla/foo, which is an already existing directory. Normally (when Dive
1951 into subdirs is not set), mc would copy file /foo/bar into the file
1952 /bla/foo/bar. By enabling this option the /bla/foo/foo directory will
1953 be created, and /foo/bar will be copied into /bla/foo/foo/bar.
1954
1955 Preserve attributes
1956
1957 determines whether to preserve the permissions, timestamps and (if you
1958 are root) the ownership of the original files. If this option is not
1959 set, the current value of the umask will be respected.
1960
1961 Use shell patterns
1962
1963 When this option is on you can use the '*' and '?' wildcards in the
1964 source mask. They work like they do in the shell. In the target mask
1965 only the '*' and '\<digit>' wildcards are allowed. The first '*' wild‐
1966 card in the target mask corresponds to the first wildcard group in the
1967 source mask, the second '*' corresponds to the second group and so on.
1968 The '\1' wildcard corresponds to the first wildcard group in the source
1969 mask, the '\2' wildcard corresponds to the second group and so on all
1970 the way up to '\9'. The '\0' wildcard is the whole filename of the
1971 source file.
1972
1973 Two examples:
1974
1975 If the source mask is "*.tar.gz", the destination is "/bla/*.tgz" and
1976 the file to be copied is "foo.tar.gz", the copy will be "foo.tgz" in
1977 "/bla".
1978
1979 Suppose you want to swap basename and extension so that "file.c" would
1980 become "c.file" and so on. The source mask for this is "*.*" and the
1981 destination is "\2.\1".
1982
1983 Use shell patterns off
1984
1985 When the shell patterns option is off the MC doesn't do automatic
1986 grouping anymore. You must use '\(...\)' expressions in the source mask
1987 to specify meaning for the wildcards in the target mask. This is more
1988 flexible but also requires more typing. Otherwise target masks are sim‐
1989 ilar to the situation when the shell patterns option is on.
1990
1991 Two examples:
1992
1993 If the source mask is "^\(.*\)\.tar\.gz$", the destination is
1994 "/bla/*.tgz" and the file to be copied is "foo.tar.gz", the copy will
1995 be "/bla/foo.tgz".
1996
1997 Let's suppose you want to swap basename and extension so that "file.c"
1998 will become "c.file" and so on. The source mask for this is
1999 "^\(.*\)\.\(.*\)$" and the destination is "\2.\1".
2000
2001 Case Conversions
2002
2003 You can also change the case of the filenames. If you use '\u' or '\l'
2004 in the target mask, the next character will be converted to uppercase
2005 or lowercase correspondingly.
2006
2007 If you use '\U' or '\L' in the target mask, the next characters will be
2008 converted to uppercase or lowercase correspondingly up to the next '\E'
2009 or next '\U', '\L' or the end of the file name.
2010
2011 The '\u' and '\l' are stronger than '\U' and '\L'.
2012
2013 For example, if the source mask is '*' ( Use shell patterns on) or
2014 '^\(.*\)$' ( Use shell patterns off) and the target mask is '\L\u*' the
2015 file names will be converted to have initial upper case and otherwise
2016 lower case.
2017
2018 You can also use '\' as a quote character. For example, '\\' is a back‐
2019 slash and '\*' is an asterisk.
2020
2021 Stable symlinks
2022
2023 commands Midnight Commander, that it should change symlinks in the tar‐
2024 get, so that they'll point to the same location as it did before. With
2025 absolute symbolic links this does nothing, but if you have a relative
2026 one, it will recompute its value, adding necessary ../ and other direc‐
2027 tory parts and making the value as short as possible (most modern
2028 filesystems keep short symlinks inside inodes and thus don't waste much
2029 disk space).
2030
2031
2033 The dialog of group of files and directories selection or uselection.
2034 The input line allow enter the regular expression of filenames that
2035 will be selected/unselected.
2036
2037 When Files only checkbox is on, only files will be selected. If Files
2038 only is off, as files as directories will be selected. When Shell Pat‐
2039 terns checkbox is on, the regular expression is much like the filename
2040 globbing in the shell (* standing for zero or more characters and ?
2041 standing for one character). If Shell Patterns is off, then the tagging
2042 of files is done with normal regular expressions (see ed (1)). When
2043 Case sensitive checkbox is on, the selection will be case sensitive
2044 characters. If Case sensitive is off, the case will be ignored.
2045
2047 The mcdiff is a visual diff tool. You can compare two files and edit
2048 them in-place (diffs are updated dynamically). You can browse and view
2049 a working copy from popular version control systems (GIT, Subversion,
2050 etc).
2051
2052 Following shortcuts are available in internal diff viewer of Midnight
2053 Commander.
2054
2055 F1 Invoke the built-in hypertext help viewer.
2056
2057 F2 Save modified files.
2058
2059 F4 Edit file of the left panel in the internal editor.
2060
2061 F14 Edit file of the right panel in the internal editor.
2062
2063 F5 Merge the current hunk. Only the current hunk will be merged.
2064
2065 F7 Start search.
2066
2067 F17 Continue search.
2068
2069 F10, Esc, q Exit from diff viewer.
2070
2071 Alt-s, s Toggle show of hunk status.
2072
2073 Alt-n, l Toggle show of line numbers.
2074
2075 f Maximize left panel.
2076
2077 = Make panels equal in width.
2078
2079 > Reduce the size of the right panel.
2080
2081 < Reduce the size of the left panel.
2082
2083 c Toggle show of trailing carriage return (CR) symbol as ^M.
2084
2085 2, 3, 4, 8 Set tabulation size
2086
2087 C-u Swap contents of diff panels.
2088
2089 C-r Refresh the screen.
2090
2091 C-o Switch to the subshell and show the command screen.
2092
2093 Enter, Space, n Find next diff hunk.
2094
2095 Backspace, p Find previous diff hunk.
2096
2097 g Go to line.
2098
2099 Down Scroll one line forward.
2100
2101 Up Scroll one line backward.
2102
2103 PageUp Move one page up.
2104
2105 PageDown Mves one page down.
2106
2107 Home, A1 Moves to the line beginning.
2108
2109 End Moves to the line end.
2110
2111 C-Home Move to the file beginning.
2112
2113 C-End, C1 Move to the file end.
2114
2116 The internal file viewer provides two display modes: ASCII and hex. To
2117 toggle between modes, use the F4 key.
2118
2119 The viewer will try to use the best method provided by your system or
2120 the file type to display the information. Some character sequences,
2121 which appear most often in preformatted manual pages, are displayed
2122 bold and underlined, thus making a pretty display of your files.
2123
2124 When in hex mode, the search function accepts text in quotes and con‐
2125 stant numbers. Text in quotes is matched exactly after removing the
2126 quotes. Each number matches one byte. You can mix quoted text with
2127 constants like this:
2128
2129 "String" 34 0xBB 012 "more text"
2130
2131 Numbers are always interpreted in hex. In the example above, "34" is
2132 interpreted as 0x34. The prefix "0x" isn't really needed: we could type
2133 "BB" instead of "0xBB". And "012" is interpreted as 0x12, not as an
2134 octal number.
2135
2136 Here is a listing of the actions associated with each key that the Mid‐
2137 night Commander handles in the internal file viewer.
2138
2139 F1 Invoke the built-in hypertext help viewer.
2140
2141 F2 Toggle the wrap mode.
2142
2143 F4 Toggle the hex mode.
2144
2145 F5 Goto. You can specify a line number, offset or percentage of file
2146 size of position that you want to view.
2147
2148 F7, /, ? Start search. These keys call the dialog window that allows
2149 you to set up the search options. If key is ? the "Backwards" option is
2150 on.
2151
2152 C-s Continue forward search.
2153
2154 C-r Continue reverse search.
2155
2156 F17, n Continue search in the chosen direction.
2157
2158 N Temporary change the search direction: backwards if forward search is
2159 chosen, and vice versa.
2160
2161 F8 Toggle Raw/Parsed mode: This will show the file as found on disk or
2162 if a processing filter has been specified in the mc.ext file, then the
2163 output from the filter. Current mode is always the other than written
2164 on the button label, since on the button is the mode which you enter by
2165 that key.
2166
2167 F9 Toggle the format/unformat mode: when format mode is on the viewer
2168 will interpret some string sequences to show bold and underline with
2169 different colors. Also, on button label is the other mode than current.
2170
2171 F10, Esc. Exit the internal file viewer.
2172
2173 next-page, space, C-v. Scroll one page forward.
2174
2175 prev-page, Alt-v, C-b, Backspace. Scroll one page backward.
2176
2177 down-key Scroll one line forward.
2178
2179 up-key Scroll one line backward.
2180
2181 C-l Refresh the screen.
2182
2183 C-o Switch to the subshell and show the command screen.
2184
2185 [n] m Set the mark n.
2186
2187 [n] r Jump to the mark n.
2188
2189 C-f Jump to the next file.
2190
2191 C-b Jump to the previous file.
2192
2193 Alt-r Toggle the ruler.
2194
2195 Alt-e to change charset of displayed text may use M-e (Alt-e). Recod‐
2196 ing is made from selected codepage into system codepage. To cancel the
2197 recoding you may select "<No translation>" in charset selection dialog.
2198
2199 It's possible to instruct the file viewer how to display a file, look
2200 at the Edit Extension File section
2201
2202
2204 The internal file editor is a full-featured full screen editor. It can
2205 edit files up to 64 megabytes. It is possible to edit binary files.
2206 The internal file editor is invoked using F4 if the use_internal_edit
2207 option is set in the initialization file.
2208
2209 The features it presently supports are: block copy, move, delete, cut,
2210 paste; key for key undo; pull-down menus; file insertion; macro com‐
2211 mands; regular expression search and replace; shift-arrow text high‐
2212 lighting (if supported by the terminal); insert-overwrite toggle; word
2213 wrap; autoindent; tunable tab size; syntax highlighting for various
2214 file types; and an option to pipe text blocks through shell commands
2215 like indent and ispell.
2216
2217 Sections:
2218
2219 Options of editor in ini-file
2220
2221 The editor is very easy to use and requires no tutoring. To see what
2222 keys do what, just consult the appropriate pull-down menu. Other keys
2223 are: Shift movement keys do text highlighting. Ctrl-Ins copies to the
2224 file mcedit.clip and Shift-Ins pastes from mcedit.clip. Shift-Del cuts
2225 to mcedit.clip, and Ctrl-Del deletes highlighted text. Mouse highlight‐
2226 ing also works, and you can override the mouse as usual by holding down
2227 the shift key while dragging the mouse to let normal terminal mouse
2228 highlighting work.
2229
2230 To define a macro, press Ctrl-R and then type out the key strokes you
2231 want to be executed. Press Ctrl-R again when finished. You can then
2232 assign the macro to any key you like by pressing that key. The macro is
2233 executed when you press Ctrl-A and then the assigned key. The macro is
2234 also executed if you press Meta, Ctrl, or Esc and the assigned key,
2235 provided that the key is not used for any other function. Once defined,
2236 the macro commands go into the file
2237 ~/.local/share/mc/mcedit/mcedit.macros You can delete a macro by delet‐
2238 ing the appropriate line in this file.
2239
2240 To change charset of displayed text may use M-e (Alt-e). Recoding is
2241 made from selected codepage into system codepage. To cancel the recod‐
2242 ing you may select "<No translation>" in charset selection dialog.
2243
2244 F19 will format the currently highlighted block (plain text or C or C++
2245 code or another). This is controlled by the file
2246 /usr/share/mc/edit.indent.rc which is copied to
2247 ~/.local/share/mc/mcedit/edit.indent.rc in your home directory the
2248 first time you use it.
2249
2250 The editor also displays non-us characters (160+). When editing binary
2251 files, you should set display bits to 7 bits in the options menu to
2252 keep the spacing clean.
2253
2254
2256 Some editor options of ini-file are described in this section. Options
2257 are placed in [Midnight-Commander] section
2258
2259 editor_wordcompletion_collect_entire_file
2260 Search autocomplete candidates in entire of file or just from
2261 begin of file to cursor position (0)
2262
2263
2265 Midnight Commander supports running many internal modules (such as edi‐
2266 tor, viewer and diff viewer) simultaneously and switching between them
2267 without closing open files. Using several file managers at a time, how‐
2268 ever, is not currently supported.
2269
2270 Let's call each of these modules a screen. There are three ways to
2271 switch between screens, using one of these global shortcuts:
2272
2273 Alt-} switch to the next screen;
2274
2275 Alt-{ switch to the previous screen;
2276
2277 Alt-` open a dialog window with the list of currently open screens (or
2278 use the "Screen list" menu item).
2279
2281 Let Midnight Commander type for you.
2282
2283 Attempt to perform completion on the text before current position. MC
2284 attempts completion treating the text as variable (if the text begins
2285 with $), username (if the text begins with ~), hostname (if the text
2286 begins with @) or command (if you are on the command line in the posi‐
2287 tion where you might type a command, possible completions then include
2288 shell reserved words and shell built-in commands as well) in turn. If
2289 none of these matches, filename completion is attempted.
2290
2291 Filename, username, variable and hostname completion works on all input
2292 lines, command completion is command line specific. If the completion
2293 is ambiguous (there are more different possibilities), MC beeps and the
2294 following action depends on the setting of the Complete: show all
2295 option in the Configuration dialog. If it is enabled, a list of all
2296 possibilities pops up next to the current position and you can select
2297 with the arrow keys and Enter the correct entry. You can also type the
2298 first letters in which the possibilities differ to move to a subset of
2299 all possibilities and complete as much as possible. If you press
2300 Alt-Tab again, only the subset will be shown in the listbox, otherwise
2301 the first item which matches all the previous characters will be high‐
2302 lighted. As soon as there is no ambiguity, dialog disappears, but you
2303 can hide it by canceling keys Esc, F10 and left and right arrow keys.
2304 If Complete: show all is disabled, the dialog pops up only if you press
2305 Alt-Tab for the second time, for the first time MC just beeps.
2306
2307 Apply escaping of ?, * and & symbols (as \?, \*, \& ) in filenames to
2308 disallow use them as metasymbols in regular expressions when substitu‐
2309 tion is performed in the input line.
2310
2311
2313 Midnight Commander is provided with a code layer to access the file
2314 system; this code layer is known as the virtual file system switch.
2315 The virtual file system switch allows Midnight Commander to manipulate
2316 files not located on the Unix file system.
2317
2318 Currently, Midnight Commander is packaged with some Virtual File Sys‐
2319 tems (VFS): the local file system, used for accessing the regular Unix
2320 file system; the ftpfs, used to manipulate files on remote systems with
2321 the FTP protocol; the tarfs, used to manipulate tar and compressed tar
2322 files; the undelfs, used to recover deleted files on ext2 file systems
2323 (the default file system for Linux systems), fish (for manipulating
2324 files over shell connections such as rsh and ssh). If the code was
2325 compiled with sftpfs (for manipulating files over SFTP connections).
2326 If the code was compiled with smbfs support, you can manipulate files
2327 on remote systems with the SMB (CIFS) protocol.
2328
2329 A generic extfs (EXTernal virtual File System) is provided in order to
2330 easily expand VFS capabilities using scripts and external software.
2331
2332 The VFS switch code will interpret all of the path names used and will
2333 forward them to the correct file system, the formats used for each one
2334 of the file systems is described later in their own section.
2335
2336 FTP File System
2337 The FTP File System (ftpfs) allows you to manipulate files on remote
2338 machines. To actually use it, you can use the FTP link item in the
2339 menu or directly change your current directory using the cd command to
2340 a path name that looks like this:
2341
2342 ftp://[!][user[:pass]@]machine[:port][remote-dir]
2343
2344 The user, port and remote-dir elements are optional. If you specify
2345 the user element, Midnight Commander will login to the remote machine
2346 as that user, otherwise it will use anonymous login or the login name
2347 from the ~/.netrc file. The optional pass element is the password used
2348 for the connection. Using the password in the VFS directory name is
2349 not recommended, because it can appear on the screen in clear text and
2350 can be saved to the directory history.
2351
2352 To enable using FTP proxy, prepend ! (an exclamation sign) to the
2353 hostname.
2354
2355 Examples:
2356
2357 ftp://ftp.nuclecu.unam.mx/linux/local
2358 ftp://tsx-11.mit.edu/pub/linux/packages
2359 ftp://!behind.firewall.edu/pub
2360 ftp://guest@remote-host.com:40/pub
2361 ftp://miguel:xxx@server/pub
2362
2363 Please check the Virtual File System dialog box for ftpfs options.
2364
2365 Tar File System
2366 The tar file system provides you with read-only access to your tar
2367 files and compressed tar files by using the chdir command. To change
2368 your directory to a tar file, you change your current directory to the
2369 tar file by using the following syntax:
2370
2371 /filename.tar/utar://[dir-inside-tar]
2372
2373 The mc.ext file already provides a shortcut for tar files, this means
2374 that usually you just point to a tar file and press return to enter
2375 into the tar file, see the Edit Extension File section for details on
2376 how this is done.
2377
2378 Examples:
2379
2380 mc-3.0.tar.gz/utar://mc-3.0/vfs
2381 /ftp/GCC/gcc-2.7.0.tar/utar://
2382
2383 The latter specifies the full path of the tar archive.
2384
2385 FIle transfer over SHell filesystem
2386 The fish file system is a network based file system that allows you to
2387 manipulate the files in a remote machine as if they were local. To use
2388 this, the other side has to either run fish server, or has to have
2389 bash-compatible shell.
2390
2391 To connect to a remote machine, you just need to chdir into a special
2392 directory which name is in the following format:
2393
2394 sh://[user@]machine[:options]/[remote-dir]
2395
2396 The user, options and remote-dir elements are optional. If you specify
2397 the user element, Midnight Commander will try to login on the remote
2398 machine as that user, otherwise it will use your login name.
2399
2400 The available options are:
2401 'C' - use compression;
2402 'r' - use rsh instead of ssh;
2403 port - specify the port used by remote server.
2404 If the remote-dir element is present, your current directory on the
2405 remote machine will be set to this one.
2406
2407 Examples:
2408
2409 sh://onlyrsh.mx:r/linux/local
2410 sh://joe@want.compression.edu:C/private
2411 sh://joe@noncompressed.ssh.edu/private
2412 sh://joe@somehost.ssh.edu:2222/private
2413
2414 SFTP (SSH File Transfer Protocol) filesystem
2415 The SFTP file system is a network based file system that allows you to
2416 manipulate the files in a remote machine as if they were local.
2417
2418 To connect to a remote machine, you just need to chdir into a special
2419 directory which name is in the following format:
2420
2421 sftp://[user@]machine:[port]/[remote-dir]
2422
2423 The user, port and remote-dir elements are optional. If you specify
2424 the user element, Midnight Commander will try to login on the remote
2425 machine as that user, otherwise it will use your login name. port -
2426 specify the port used by remote server (22 by default). If the
2427 remote-dir element is present, your current directory on the remote
2428 machine will be set to this one.
2429
2430 Examples:
2431
2432 sftp://onlyrsh.mx/linux/local
2433 sftp://joe:password@want.compression.edu/private
2434 sftp://joe@noncompressed.ssh.edu/private
2435 sftp://joe@somehost.ssh.edu:2222/private
2436
2437 Undelete File System
2438 On Linux systems, if you asked configure to use the ext2fs undelete
2439 facilities, you will have the undelete file system available. Recovery
2440 of deleted files is only available on ext2 file systems. The undelete
2441 file system is just an interface to the ext2fs library to retrieve all
2442 of the deleted files names on an ext2fs and provides and to extract the
2443 selected files into a regular partition.
2444
2445 To use this file system, you have to chdir into the special file name
2446 formed by the "undel://" prefix and the file name where the actual file
2447 system resides.
2448
2449 For example, to recover deleted files on the second partition of the
2450 first SCSI disk on Linux, you would use the following path name:
2451
2452 undel://sda2
2453
2454 It may take a while for the undelfs to load the required information
2455 before you start browsing files there.
2456
2457 SMB File System
2458 The smbfs allows you to manipulate files on remote machines with SMB
2459 (or CIFS) protocol. These include Windows for Workgroups, Windows
2460 9x/ME/XP, Windows NT, Windows 2000 and Samba. To actually use it, you
2461 may try to use the panel command "SMB link..." (accessible from the
2462 menubar) or you may directly change your current directory to it using
2463 the cd command to a path name that looks like this:
2464
2465 smb://[user@]machine[/service][/remote-dir]
2466
2467 The user, service and remote-dir elements are optional. The user,
2468 domain and password can be specified in an input dialog.
2469
2470 Examples:
2471
2472 smb://machine/Share
2473 smb://other_machine
2474 smb://guest@machine/Public/Irlex
2475
2476 EXTernal File System
2477 extfs allows you to integrate numerous features and file types into GNU
2478 Midnight Commander in an easy way, by writing scripts.
2479
2480 Extfs filesystems can be divided into two categories:
2481
2482 1. Stand-alone filesystems, which are not associated with any existing
2483 file. They represent certain system-wide data as a directory tree.
2484 You can invoke them by typing cd fsname:// where fsname is an extfs
2485 short name (see below). Examples of such filesystems include audio
2486 (list audio tracks on the CD) or apt (list of all Debian packages in
2487 the system).
2488
2489 For example, to list CD-Audio tracks on your CD-ROM drive, type
2490
2491 cd audio://
2492
2493 2. 'Archive' filesystems (like rpm, patchfs and more), which represent
2494 contents of a file as a directory tree. It can consist of 'real' files
2495 compressed in an archive (urar, rpm) or virtual files, like messages in
2496 a mailbox (mailfs) or parts of a patch (patchfs). To access such
2497 filesystems fsname:// should be appended to the archive name. Note
2498 that the archive itself can be on another vfs.
2499
2500 For example, to list contents of a zip archive documents.zip type
2501
2502 cd documents.zip/uzip://
2503
2504 In many aspects, you could treat extfs like any other directory. For
2505 instance, you can add it to the hotlist or change to it from directory
2506 history. An important limitation is that you cannot invoke shell com‐
2507 mands inside extfs, just like any other non-local VFS.
2508
2509 Common extfs scripts included with Midnight Commander are:
2510
2511 a access 'A:' DOS/Windows diskette (cd a://).
2512
2513 apt front end to Debian's APT package management system (cd apt://).
2514
2515 audio audio CD ripping and playing (cd audio:// or cd
2516 device/audio://).
2517
2518 bpp package of Bad Penguin GNU/Linux distribution (cd
2519 file.bpp/bpp://).
2520
2521 deb package of Debian GNU/Linux distribution (cd file.deb/deb://).
2522
2523 dpkg Debian GNU/Linux installed packages (cd deb://).
2524
2525 hp48 view and copy files to/from a HP48 calculator (cd hp48://).
2526
2527 lslR browsing of lslR listings as found on many FTPs (cd file‐
2528 name/lslR://).
2529
2530 mailfs mbox-style mailbox files support (cd mailbox/mailfs://).
2531
2532 patchfs
2533 extfs to handle unified and context diffs (cd file‐
2534 name/patchfs://).
2535
2536 rpm RPM package (cd filename/rpm://).
2537
2538 rpms RPM database management (cd rpms://).
2539
2540 ulha, urar, uzip, uzoo, uar, uha
2541 archivers (cd archive/xxxx:// where xxxx is one of: ulha, urar,
2542 uzip, uzoo, uar, uha).
2543
2544 You could bind file type/extension to specified extfs as described in
2545 the Edit Extension File section. Here is an example entry for Debian
2546 packages:
2547
2548 regex/.deb$
2549 Open=%cd %p/deb://
2550
2552 Midnight Commander will try to detect if your terminal supports color
2553 using the terminal database and your terminal name. Sometimes it gets
2554 confused, so you may force color mode or disable color mode using the
2555 -c and -b flag respectively.
2556
2557 If the program is compiled with the S-Lang screen manager instead of
2558 ncurses, it will also check the variable COLORTERM, if it is set, it
2559 has the same effect as the -c flag.
2560
2561 You may specify terminals that always force color mode by adding the
2562 color_terminals variable to the Colors section of the initialization
2563 file. This will prevent Midnight Commander from trying to detect if
2564 your terminal supports color. Example:
2565
2566 [Colors]
2567 color_terminals=linux,xterm
2568 color_terminals=terminal-name1,terminal-name2...
2569
2570 The program can be compiled with both ncurses and S-Lang, ncurses does
2571 not provide a way to force color mode: ncurses uses just the informa‐
2572 tion in the terminal database.
2573
2574 Midnight Commander provides a way to change the default colors. Cur‐
2575 rently the colors are configured using the environment variable
2576 MC_COLOR_TABLE or the Colors section in the initialization file.
2577
2578 In the Colors section, the default color map is loaded from the
2579 base_color variable. You can specify an alternate color map for a ter‐
2580 minal by using the terminal name as the key in this section. Example:
2581
2582 [Colors]
2583 base_color=
2584 xterm=menu=magenta:marked=,magenta:markselect=,red
2585
2586 The format for the color definition is:
2587
2588 <keyword>=<fgcolor>,<bgcolor>,<attributes>:<keyword>=...
2589
2590 The colors are optional, and the keywords are: normal, selected, dis‐
2591 abled, marked, markselect, errors, input, inputmark, inputunchanged,
2592 commandlinemark, reverse, gauge, header, inputhistory, commandhistory.
2593 Button bar colors are: bbarhotkey, bbarbutton. Status bar color: sta‐
2594 tusbar. Menu colors are: menunormal, menusel, menuhot, menuhotsel, men‐
2595 uinactive. Dialog colors are: dnormal, dfocus, dhotnormal, dhotfocus,
2596 dtitle. Error dialog colors are: errdfocus, errdhotnormal, errdhotfo‐
2597 cus, errdtitle. Help colors are: helpnormal, helpitalic, helpbold,
2598 helplink, helpslink, helptitle. Viewer colors are: viewnormal, view‐
2599 bold, viewunderline, viewselected. Editor colors are: editnormal, edit‐
2600 bold, editmarked, editwhitespace, editlinestate. Popup menu colors are:
2601 pmenunormal, pmenusel, pmenutitle.
2602
2603 header determines the color of panel header, the line that contains
2604 column titles and sort mode indicator.
2605
2606 input determines the color of input lines used in query dialogs.
2607
2608 gauge determines the color of the filled part of the progress bar
2609 (gauge), which is used to show the user the progress of file opera‐
2610 tions, such as copying.
2611
2612 disabled determines the color of the widget that cannot be selected.
2613
2614 The dialog boxes use the following colors: dnormal is used for the nor‐
2615 mal text, dfocus is the color used for the currently selected compo‐
2616 nent, dhotnormal is the color used to differentiate the hotkey color in
2617 normal components, whereas the dhotfocus color is used for the high‐
2618 lighted color in the currently selected component.
2619
2620 Menus use the same scheme but uses the menunormal, menusel, menuhot,
2621 menuhotsel and menuinactive tags instead.
2622
2623 Help uses the following colors: helpnormal is used for normal text,
2624 helpitalic is used for text which is emphasized in italic in the manual
2625 page, helpbold is used for text which is emphasized in bold in the man‐
2626 ual page, helplink is used for not selected hyperlinks and helpslink is
2627 used for selected hyperlink.
2628
2629 Popup menu uses following colors: pmenunormal is used for non-selected
2630 menu items and as a main color of popup menu window, pmenusel is used
2631 for selected menu item, pmenutitle is used for popup menu title.
2632
2633 The possible colors are: black, gray, red, brightred, green, bright‐
2634 green, brown, yellow, blue, brightblue, magenta, brightmagenta, cyan,
2635 brightcyan, lightgray and white. And there is a special keyword for
2636 transparent background. It is 'default'. The 'default' can only be used
2637 for background color. Another special keyword "base" means mc's main
2638 colors. When 256 colors are available, they can be specified either as
2639 color16 to color255, or as rgb000 to rgb555 and gray0 to gray23. Exam‐
2640 ple:
2641
2642 [Colors]
2643 base_color=normal=white,default:marked=magenta,default
2644
2645 Attributes can be any of bold, italic, underline, reverse and blink,
2646 appended by a plus sign if more than one are desired. The special word
2647 "none" means no attributes, without attempting to fall back to
2648 base_color. Example:
2649
2650 menuhotsel=yellow;black;bold+underline
2651
2652
2654 You can change the appearance of Midnight Commander. To do this, you
2655 must specify a file that contain descriptions of colors and lines to
2656 draw boxes. Redefining of the colors is entirely compatible with the
2657 assignment of colors, as described in Section Colors.
2658
2659 If your skin contains any true-color definitions, you should define the
2660 'truecolors' key set to TRUE value in [skin] section. If true-color is
2661 not used but 256-color is, you should define '256colors' instead.
2662
2663 A skin-file is searched on the following algorithm (to the first one
2664 found):
2665
2666 1) command line option -S <skin> or --skin=<skin>
2667 2) Environment variable MC_SKIN
2668 3) Parameter skin in section [Midnight-Commander] in config
2669 file.
2670 4) File /etc/mc/skins/default.ini
2671 5) File /usr/share/mc/skins/default.ini
2672
2673
2674 Command line option, environment variable and parameter in config file
2675 may contain the absolute path to the skin-file (with the extension .ini
2676 or without it). Search of skin-file will occur in (to the first one
2677 found):
2678
2679 1) ~/.local/share/mc/skins/
2680 2) /etc/mc/skins/
2681 3) /usr/share/mc/skins/
2682
2683
2684 For getting extended info, refer to:
2685
2686 Description of section and parameters
2687 Color pair definitions
2688 Color and attribute aliases
2689 Draw lines
2690 Compatibility
2691
2692
2693 Description of section and parameters
2694 Section [skin] contain metainfo for skin-file. Parameter description
2695 contain short text about skin.
2696
2697
2698 Section [filehighlight] contain descriptions of color pairs for file‐
2699 names highlighting. Name of parameters must be equal to names of sec‐
2700 tions into filehighlight.ini file. See Filenames Highlight for getting
2701 more info.
2702
2703
2704 Section [core] describes the elements that are used everywhere.
2705
2706 _default_
2707 Default color pair. Used in all other sections if they not con‐
2708 tain color definitions
2709
2710 selected
2711 cursor
2712
2713 marked selected data
2714
2715 markselect
2716 cursor on selected data
2717
2718 gauge color of the filled part of the progress bar
2719
2720 input color of input lines used in query dialogs
2721
2722 inputmark
2723 color of input selected text
2724
2725 inputunchanged
2726 color of input text before first modification or cursor movement
2727
2728 commandlinemark
2729 color of selected text in command line
2730
2731 reverse
2732 reverse color
2733
2734 Section [dialog] describes the elements that are placed on dialog win‐
2735 dows (except error dialogs).
2736
2737 _default_
2738 Default color for this section. Used [core]._default_ if not
2739 specified
2740
2741 dfocus Color of active element (in focus)
2742
2743 dhotnormal
2744 Color of hotkeys
2745
2746 dhotfocus
2747 Color of hotkeys in focused element
2748
2749
2750 Section [error] describes the elements that are placed on error dialog
2751 windows
2752
2753 _default_
2754 Default color for this section. Used [core]._default_ if not
2755 specified
2756
2757 errdhotnormal
2758 Color of hotkeys
2759
2760 errdhotfocus
2761 Color of hotkeys in focused element
2762
2763
2764 Section [menu] describes the elements that are placed in menu. This
2765 section describes system menu (called by F9) and user-defined menus
2766 (called by F2 in panels and by F11 in editor).
2767
2768 _default_
2769 Default color for this section. Used [core]._default_ if not
2770 specified
2771
2772 entry Color of menu items
2773
2774 menuhot
2775 Color of menu hotkeys
2776
2777 menusel
2778 Color of active menu item (in focus)
2779
2780 menuhotsel
2781 Color of menu hotkeys in focused menu item
2782
2783 menuinactive
2784 Color of inactive menu
2785
2786
2787 Section [help] describes the elements that are placed on help window.
2788
2789 _default_
2790 Default color for this section. Used [core]._default_ if not
2791 specified
2792
2793 helpitalic
2794 Color pair for element with italic attribute
2795
2796 helpbold
2797 Color pair for element with bold attribute
2798
2799 helplink
2800 Color of links
2801
2802 helpslink
2803 Color of active link (on focus)
2804
2805
2806 Section [editor] describes the colors of elements placed in editor.
2807
2808 _default_
2809 Default color for this section. Used [core]._default_ if not
2810 specified
2811
2812 editbold
2813 Color pair for element with bold attribute
2814
2815 editmarked
2816 Color of selected text
2817
2818 editwhitespace
2819 Color of tabs and trailing spaces highlighting
2820
2821 editlinestate
2822 Color for line state area
2823
2824
2825 Section [viewer] describes the colors of elements placed in viewer.
2826
2827 viewunderline
2828 Color pair for element with underline attribute
2829
2830
2831 Color pair definitions
2832 Any parameter in skin-file contain definition of color pair.
2833
2834 Color pairs described as two colors and the optional attributes sepa‐
2835 rated by ';'. First field sets the foreground color, second field sets
2836 background color, third field sets the attributes. Any of the fields
2837 may be omitted, in this case value will be taken from default color
2838 pair (global color pair or from default color pair of this section).
2839
2840 Example:
2841 [core]
2842 # green on black
2843 _default_=green;black
2844 # green (default) on blue
2845 selected=;blue
2846 # yellow on black (default)
2847 # underlined yellow on black (default)
2848 marked=yellow;;underline
2849
2850
2851 Possible colors (names) and attributes are described in Colors. sec‐
2852 tion.
2853
2854
2855 Color and attribute aliases
2856 This optional section might define aliases for single colors (not color
2857 pairs) as well as combination of attributes; in other words, for semi‐
2858 colon-separated fragments of parameters. Aliases can refer to other
2859 aliases as long as they don't form a loop.
2860
2861 Example:
2862 [aliases]
2863 myfavfg=green
2864 myfavbg=black
2865 myfavattr=bold+italic
2866 [core]
2867 _default_=myfavfg;myfavbg;myfavattr
2868
2869
2870 Draw lines
2871 Lines sets in section [Lines] into skin-file. By default single lines
2872 are used, but you may redefine to usage of any utf-8 symbols (like to
2873 lines, for example).
2874
2875 WARNING!!! When you build Midnight Commander with the ncurses screen
2876 library usage of drawing lines is limited! Possible only drawing a
2877 single lines. For all questions and comments please contact the devel‐
2878 opers of ncurses.
2879
2880
2881 Descriptions of parameters [Lines]:
2882
2883 lefttop
2884 left-top line fragment.
2885
2886 righttop
2887 right-top line fragment.
2888
2889 centertop
2890 down branch of horizontal line
2891
2892 centerbottom
2893 up branch of horizontal line
2894
2895 leftbottom
2896 left-bottom line fragment
2897
2898 rightbottom
2899 right-bottom line fragment
2900
2901 leftmiddle
2902 right branch of vertical line
2903
2904 rightmiddle
2905 left branch of vertical line
2906
2907 centermiddle
2908 cross of lines
2909
2910 horiz horizontal line
2911
2912 vert vertical line
2913
2914 thinhoriz
2915 thin horizontal line
2916
2917 thinvert
2918 thin vertical line
2919
2920
2921
2922 Compatibility
2923 Appointment of color by skin-files fully compatible with the appoint‐
2924 ment of the colors described in Colors. section.
2925
2926 In this case, reassignment of colors has priority over the skin file
2927 and is complementary.
2928
2929
2931 Section [filehighlight] in current skin-file contains key names as
2932 highlight groups and values as color pairs. Color pairs is documented
2933 in Skins section.
2934
2935 Rules of filenames highlight are placed in /usr/share/mc/filehigh‐
2936 light.ini file (~/.config/mc/filehighlight.ini). Name of section in
2937 this file must be equal to parameters names in [filehighlight] section
2938 (in current skin-file).
2939
2940 Keys in these groups are:
2941
2942 type file type. If present, all other options are ignored.
2943
2944 regexp regular expression. If present, 'extensions' option is ignored.
2945
2946 extensions
2947 list of extensions of files. Separated by ';' sign.
2948
2949 extensions_case
2950 (make sense only with 'extensions' parameter) make 'extensions'
2951 rule case sensitive (true) or not (false).
2952
2953 `type' key may have values:
2954 - FILE (all files)
2955 - FILE_EXE
2956 - DIR (all directories)
2957 - LINK_DIR
2958 - LINK (all links except stale link)
2959 - HARDLINK
2960 - SYMLINK
2961 - STALE_LINK
2962 - DEVICE (all device files)
2963 - DEVICE_BLOCK
2964 - DEVICE_CHAR
2965 - SPECIAL (all special files)
2966 - SPECIAL_SOCKET
2967 - SPECIAL_FIFO
2968 - SPECIAL_DOOR
2969
2971 Most of Midnight Commander settings can be changed from the menus. How‐
2972 ever, there are a small number of settings which can only be changed by
2973 editing the setup file.
2974
2975 These variables may be set in your ~/.config/mc/ini file:
2976
2977 clear_before_exec
2978 By default, Midnight Commander clears the screen before execut‐
2979 ing a command. If you would prefer to see the output of the
2980 command at the bottom of the screen, edit your ~/.config/mc/ini
2981 file and change the value of the field clear_before_exec to 0.
2982
2983 confirm_view_dir
2984 If you press F3 on a directory, normally MC enters that direc‐
2985 tory. If this flag is set to 1, then MC will ask for confirma‐
2986 tion before changing the directory if you have files tagged.
2987
2988 ftpfs_retry_seconds
2989 This value is the number of seconds Midnight Commander will wait
2990 before attempting to reconnect to an FTP server that has denied
2991 the login. If the value is zero, the login will no be retried.
2992
2993 max_dirt_limit
2994 Specifies how many screen updates can be skipped at most in the
2995 internal file viewer. Normally this value is not significant,
2996 because the code automatically adjusts the number of updates to
2997 skip according to the rate of incoming keystrokes. However, on
2998 very slow machines or terminals with a fast keyboard auto
2999 repeat, a big value can make screen updates too jumpy.
3000
3001 It seems that setting max_dirt_limit to 10 causes the best
3002 behavior, and that is the default value.
3003
3004 mouse_move_pages_viewer
3005 Controls if scrolling with the mouse is done by pages or line by
3006 line on the internal file viewer.
3007
3008 only_leading_plus_minus
3009 Allow special treatment for '+', '-', '*' in the command line
3010 (select, unselect, reverse selection) only if the command line
3011 is empty. You don't need to quote those characters in the mid‐
3012 dle of the command line. On the other hand, you cannot use them
3013 to change selection when the command line is not empty.
3014
3015 alternate_plus_minus
3016 If true, use '+', '-', '\' and '*' keys normally. For
3017 select/unselect, use 'M-+', 'M--' and 'M-*'.
3018
3019 show_output_starts_shell
3020 This variable only works if you are not using the subshell sup‐
3021 port. When you use the C-o keystroke to go back to the user
3022 screen, if this one is set, you will get a fresh shell. Other‐
3023 wise, pressing any key will bring you back to Midnight Comman‐
3024 der.
3025
3026 timeformat_recent
3027 Change the time format used to display dates less than 6 months
3028 from now. See strftime or date man page for the format specifi‐
3029 cation. If this option is absent, default timeformat is used.
3030
3031 timeformat_old
3032 Change the time format used to display dates older than 6
3033 months from now or for dates in the future. See strftime or
3034 date man page for the format specification. If this option is
3035 absent, default timeformat is used.
3036
3037 torben_fj_mode
3038 If this flag is set, then the home and end keys will work
3039 slightly different on the panels, instead of moving the selec‐
3040 tion to the first and last files in the panels, they will act as
3041 follows:
3042
3043 The home key will: Go up to the middle line, if below it; else
3044 go to the top line unless it is already on the top line, in this
3045 case it will go to the first file in the panel.
3046
3047 The end key has a similar behavior: Go down to the middle line,
3048 if over it; else go to the bottom line unless you already are at
3049 the bottom line, in such case it will move the selection to the
3050 last file name in the panel.
3051
3052 use_file_to_guess_type
3053 If this variable is on (the default) it will spawn the file com‐
3054 mand to match the file types listed on the mc.ext file.
3055
3056 xtree_mode
3057 If this variable is on (default is off) when you browse the file
3058 system on a Tree panel, it will automatically reload the other
3059 panel with the contents of the selected directory.
3060
3061 fish_directory_timeout
3062 This variable holds the lifetime of a directory cache entry in
3063 seconds. The default value is 900 seconds.
3064
3065 clipboard_store
3066 This variable contains path (with options) to the external clip‐
3067 board utility like 'xclip' to read text into X selection from
3068 file. For example:
3069
3070 clipboard_store=xclip -i
3071
3072 clipboard_paste
3073 This variable contains path (with options) to the external clip‐
3074 board utility like 'xclip' to print the selection to standard
3075 out. For example:
3076
3077 clipboard_paste=xclip -o
3078
3079 autodetect_codeset
3080 This option allows use the `enca' command to autodetect codeset
3081 of text files in internal viewer and editor. List of valid val‐
3082 ues can be obtain by the `enca --list languages | cut -d : -f1'
3083 command. Option must be located in the [Misc] section.
3084
3085 For example:
3086
3087 autodetect_codeset=russian
3088
3090 Midnight Commander provides a way for specify an options for external
3091 editors and viewers. Midnight Commander tries to search the "[External
3092 editor or viewer parameters]" section in the system initialization file
3093 (the mc.lib file located in Midnight Commander's library directory) and
3094 then in the ~/.config/mc/ini file. The option name should be equal to
3095 the name (full pathname) of external editor or viewer. The option value
3096 can contain following variables:
3097
3098 %filename
3099 The filename to edit/view.
3100
3101 %lineno
3102 The start line in the opening file.
3103
3104 For example:
3105
3106 [External editor or viewer parameters]
3107 vi=%filename +%lineno
3108 joe=%filename +%lineno
3109 more=%filename +%lineno
3110
3111 Start line is passed to the external editor/viewer only if it is called
3112 from the Find file results window.
3113
3114 If external editor/viewer is launched via F4/F3 keys, MC hopes that
3115 program (at least "joe", but probably others too) has an own feature
3116 that by default opens the file where it was last open. MC doesn't pre‐
3117 vent external editor/viewer to save and restore position in opened
3118 files.
3119
3121 Midnight Commander provides a way to fix your system terminal database
3122 without requiring root privileges. Midnight Commander searches in the
3123 system initialization file (the mc.lib file located in Midnight Comman‐
3124 der's library directory) and in the ~/.config/mc/ini file for the sec‐
3125 tion "terminal:your-terminal-name" and then for the section "termi‐
3126 nal:general", each line of the section contains a key symbol that you
3127 want to define, followed by an equal sign and the definition for the
3128 key. You can use the special \e form to represent the escape character
3129 and the ^x to represent the control-x character.
3130
3131 The possible key symbols are:
3132
3133 f0 to f20 Function keys f0-f20
3134 bs backspace
3135 home home key
3136 end end key
3137 up up arrow key
3138 down down arrow key
3139 left left arrow key
3140 right right arrow key
3141 pgdn page down key
3142 pgup page up key
3143 insert the insert character
3144 delete the delete character
3145 complete to do completion
3146
3147 For example, to define the key insert to be the Escape + [ + O + p, you
3148 set this in the ini file:
3149
3150 insert=\e[Op
3151
3152
3153 Also now you can use extended learn keys. For example:
3154
3155 ctrl-alt-right=\e[[1;6C
3156 ctrl-alt-left=\e[[1;6D
3157
3158
3159 This means that ctrl+alt+left sends a \e[[1;6D escape sequence and
3160 therefore Midnight Commander interprets "\e[[1;6D" as Ctrl-Alt-Left.
3161
3162
3163 The complete key symbol represents the escape sequences used to invoke
3164 the completion process, this is invoked with Alt-tab, but you can
3165 define other keys to do the same work (on those keyboard with tons of
3166 nice and unused keys everywhere).
3167
3168
3170 Full paths below may vary between installations. They are also
3171 affected by the MC_DATADIR environment variable. If it's set, its value
3172 is used instead of /usr/share/mc in the paths below.
3173
3174 /usr/share/mc/help/mc.hlp
3175
3176 The help file for the program.
3177
3178 /usr/share/mc/mc.ext
3179
3180 The default system-wide extensions file.
3181
3182 ~/.config/mc/mc.ext
3183
3184 User's own extension, view configuration and edit configuration
3185 file. They override the contents of the system wide files if
3186 present.
3187
3188 /etc/mc/mc.ini
3190
3191System-wide setup files for Midnight Commander, used only if the user doesn't
3192have his own ~/.config/mc/ini file. If /etc/mc/mc.ini exists,
3193/usr/share/mc/mc.ini isn't used.
3194
3196
3197 Global settings for Midnight Commander. Settings in this file affect
3198 all users, whether they have ~/.config/mc/ini or not. Currently, only
3199 terminal settings are loaded from mc.lib.
3200
3202
3203 User's own setup. If this file is present then the setup is loaded from
3204 here instead of the system-wide startup file.
3205
3207
3208 This file contains the hints displayed by the program.
3209
3211
3212 This file contains the default system-wide applications menu.
3213
3215
3216 User's own application menu. If this file is present it is used instead
3217 of the system-wide applications menu.
3218
3220
3221 The directory list for the directory tree and tree view features.
3222
3224
3225 Local user-defined menu. If this file is present, it is used instead of
3226 the home or system-wide applications menu.
3227
3228To change default root directory of MC, you can use MC_PROFILE_ROOT environ‐
3229ment variable. The value of MC_PROFILE_ROOT must be an absolute path. If
3230MC_PROFILE_ROOT is unset or empty, HOME variable is used. If HOME is unset or
3231empty, MC directories are get from GLib library.
3232
3234 This program is distributed under the terms of the GNU General Public
3235 License as published by the Free Software Foundation. See the built-in
3236 help for details on the License and the lack of warranty.
3237
3239 The latest version of this program can be found at http://ftp.mid‐
3240 night-commander.org/.
3241
3243 ed(1), gpm(1), terminfo(1), view(1), sh(1), bash(1), tcsh(1), zsh(1).
3244
3245 Midnight Commander's page on the World Wide Web:
3246 http://www.midnight-commander.org/
3247
3249 Authors and contributors are listed in the AUTHORS file in the source
3250 distribution.
3251
3253 See the file TODO in the distribution for information on what remains
3254 to be done.
3255
3256 If you want to report a problem with the program, please create bugre‐
3257 port at http://www.midnight-commander.org/.
3258
3259 Provide a detailed description of the bug, the version of the program
3260 you are running (mc -V displays this information), the operating system
3261 you are running the program on. If the program crashes, we would
3262 appreciate a stack trace.
3263
3264
3265
3266MC Version 4.8.24 January 2020 MC(1)