Ticket #1767: Custom/locale-based date format
[midnight-commander.git] / doc / man / mc.1.in
blob88e019e4df9aee93907ada2fa4a401cd80b8923b
1 .\"TOPICS "Topics:"
2 .TH MC 1 "August 2009" "MC Version 4.7.0\-pre1" "GNU Midnight Commander"
3 .\"SKIP_SECTION"
4 .SH "NAME"
5 mc \- Visual shell for Unix\-like systems.
6 .\"SKIP_SECTION"
7 .SH "USAGE"
8 .B mc
9 [\-abcCdfhPstuUVx] [\-l log] [dir1 [dir2]] [\-e [file]] [\-v file]
10 .\"NODE "DESCRIPTION"
11 .SH "DESCRIPTION"
12 GNU Midnight Commander is a directory browser/file manager for
13 Unix\-like operating systems.
14 .\"NODE "OPTIONS"
15 .\".\"DONT_SPLIT"
16 .SH "OPTIONS"
17 .TP
18 .I \-a, \-\-stickchars
19 Disable usage of graphic characters for line drawing.
20 .TP
21 .I \-b, \-\-nocolor
22 Force black and white display.
23 .TP
24 .I \-c, \-\-color
25 Force color mode, please check the section
26 .\"LINK2"
27 Colors
28 .\"Colors"
29 for more information.
30 .TP
31 .I \-C arg, \-\-colors=arg
32 Specify a different color set in the command line.  The format of arg is
33 documented in the
34 .\"LINK2"
35 Colors
36 .\"Colors"
37 section.
38 .TP
39 .I \-S arg
40 Specify a name of skin in the command line. Technology of skins is
41 documented in the
42 .\"LINK2"
43 Skins\&.
44 .\"Skins"
45 section.
46 .TP
47 .I \-d, \-\-nomouse
48 Disable mouse support.
49 .TP
50 .I \-e [file], \-\-edit[=file]
51 Start the internal editor.  If the file is specified, open it on
52 startup.  See also
53 .BR "mcedit (1)" .
54 .TP
55 .I \-f, \-\-datadir
56 Display the compiled\-in search paths for Midnight Commander files.
57 .TP
58 .I \-k, \-\-resetsoft
59 Reset softkeys to their default from the termcap/terminfo
60 database. Only useful on HP terminals when the function keys don't work.
61 .TP
62 .I \-K file
63 Specify a name of keymap file in the command line.
64 .TP
65 .I \-l file, \-\-ftplog=file
66 Save the ftpfs dialog with the server in file.
67 .TP
68 .I \-P file, \-\-printwd=file
69 Print the last working directory to the specified file.  This option is
70 not meant to be used directly.  Instead, it's used from a special shell
71 script that automatically changes the current directory of the shell to
72 the last directory the Midnight Commander was in.  Source the file
73 .B @prefix@/share/mc/bin/mc.sh
74 (bash and zsh users) or
75 .B @prefix@/share/mc/bin/mc.csh
76 (tcsh users) respectively to define
77 .B mc
78 as an alias to the appropriate shell script.
79 .TP
80 .I \-s
81 Set alternative mode drawing of frameworks.
82 If the section [Lines] is not filled, the symbol for the pseudographics
83 frame is a space, otherwise the frame characters are taken from follow params.
85 .B You can redefine the following variables:
86 .TP
87 .B lefttop
88 left\-top corner
89 .TP
90 .B righttop
91 right\-top corner
92 .TP
93 .B centertop
94 center-top cross
95 .TP
96 .B centerbottom
97 center\-bottom cross
98 .TP
99 .B leftbottom
100 left\-bottom corner
102 .B rightbottom
103 right\-bottom corner
105 .B leftmiddle
106 left\-middle cross
108 .B rightmiddle
109 right\-middle cross
111 .B centermiddle
112 center cross
114 .B horiz
115 default horizontal line
117 .B vert
118 default vertical line
120 .B thinhoriz
121 thin horizontal line
123 .B thinvert
124 thin vertical line
126 .I \-t, \-\-termcap
127 Used only if the code was compiled with Slang and terminfo: it makes
128 the Midnight Commander use the value of the
129 .B TERMCAP
130 variable for the terminal information instead of the information on
131 the system wide terminal database
133 .I \-u, \-\-nosubshell
134 Disable use of the concurrent shell (only makes sense if the Midnight
135 Commander has been built with concurrent shell support).
137 .I \-U, \-\-subshell
138 Enable use of the concurrent shell support (only makes sense if the
139 Midnight Commander was built with the subshell support set as an
140 optional feature).
142 .I \-v file, \-\-view=file
143 Start the internal viewer to view the specified file.  See also
144 .BR "mcview (1)" .
146 .I \-V, \-\-version
147 Display the version of the program.
149 .I \-x, \-\-xterm
150 Force xterm mode.  Used when running on xterm\-capable terminals (two
151 screen modes, and able to send mouse escape sequences).
153 If specified, the first path name is the directory to show in the
154 selected panel; the second path name is the directory to be shown in
155 the other panel.
156 .\"NODE "Overview"
157 .SH "Overview"
158 The screen of the Midnight Commander is divided into four parts.
159 Almost all of the screen space is taken up by two directory panels.
160 By default, the second line from the bottom of the screen is the
161 shell command line, and the bottom line shows the function key labels.
162 The topmost line is the
163 .\"LINK2"
164 menu bar line\&.
165 .\"Menu Bar"
166 The menu bar line may not be visible, but appears if you click the
167 topmost line with the mouse or press the F9 key.
169 The Midnight Commander provides a view of two directories at the same
170 time. One of the panels is the current panel (a selection bar is in
171 the current panel). Almost all operations take place on the current
172 panel. Some file operations like Rename and Copy by default use the
173 directory of the unselected panel as a destination (don't worry, they
174 always ask you for confirmation first). For more information, see the
175 sections on the
176 .\"LINK2"
177 Directory Panels\&,
178 .\"Directory Panels"
180 .\"LINK2"
181 Left and Right Menus
182 .\"Left and Right Menus"
183 and the
184 .\"LINK2"
185 File Menu\&.
186 .\"File Menu"
188 You can execute system commands from the Midnight Commander by simply
189 typing them. Everything you type will appear on the shell command line,
190 and when you press Enter the Midnight Commander will execute the
191 command line you typed; read the
192 .\"LINK2"
193 Shell Command Line
194 .\"Shell Command Line"
196 .\"LINK2"
197 Input Line Keys
198 .\"Input Line Keys"
199 sections to learn more about the command line.
200 .\"NODE "Mouse Support"
201 .SH "Mouse Support"
202 The Midnight Commander comes with mouse support.  It is activated
203 whenever you are running on an
204 .B xterm(1)
205 terminal (it even works if you take a telnet, ssh or rlogin connection to
206 another machine from the xterm) or if you are running on a Linux
207 console and have the
208 .B gpm
209 mouse server running.
211 When you left click on a file in the directory panels, that file is
212 selected; if you click with the right button, the file is marked (or
213 unmarked, depending on the previous state).
215 Double\-clicking on a file will try to execute the command if it is
216 an executable program; and if the
217 .\"LINK2"
218 extension file
219 .\"Extension File Edit"
220 has a program specified for the file's extension, the specified
221 program is executed.
223 Also, it is possible to execute the commands assigned to the function
224 key labels by clicking on them.
226 If a mouse button is clicked on the top frame line of the directory panel,
227 it is scrolled one page up.  Likewise, a click on the bottom frame line
228 will cause scrolling one page down.  This frame line method works also
229 in the
230 .\"LINK2"
231 Help Viewer
232 .\"Contents"
233 and the
234 .\"LINK2"
235 Directory Tree\&.
236 .\"Directory Tree"
238 The default auto repeat rate for the mouse buttons is 400
239 milliseconds. This may be changed to other values by editing the
240 .\"LINK2"
241 \&~/.mc/ini
242 .\"Save Setup"
243 file and changing the
244 .I mouse_repeat_rate
245 parameter.
247 If you are running the Midnight Commander with the mouse support, you
248 can get the default mouse behavior (cutting and pasting text) by holding
249 down the Shift key.
250 .SH ""
251 .\"NODE "Keys"
252 .SH "Keys"
253 Some commands in the Midnight Commander involve the use of the
254 .I Control
255 (sometimes labeled CTRL or CTL) and the
256 .I Meta
257 (sometimes labeled ALT or even Compose) keys. In this manual we will
258 use the following abbreviations:
260 .B C\-<chr>
261 means hold the Control key while typing the character <chr>.
262 Thus C\-f would be: hold the Control key and type f.
264 .B Alt\-<chr>
265 means hold the Meta or Alt key down while typing <chr>.
266 If there is no Meta or Alt key, type
267 .IR ESC ,
268 release it, then type the character <chr>.
270 .B S\-<chr>
271 means hold the Shift key down while typing <chr>.
273 All input lines in the Midnight Commander use an approximation to
274 the GNU Emacs editor's key bindings (default).
276 You may redefine key bindings. See
277 .\"LINK2"
278 .I redefine hotkey bindings
279 .\"Keys_redefine"
281 for more info. All other key bindings (described in this manual) relative
282 to default behavior.
285 There are many sections which tell about the keys. The following are
286 the most important.
289 .\"LINK2"
290 File Menu
291 .\"File Menu"
292 section documents the keyboard shortcuts for the commands appearing in
293 the File menu. This section includes the function keys. Most of these
294 commands perform some action, usually on the selected file or the
295 tagged files.
298 .\"LINK2"
299 Directory Panels
300 .\"Directory Panels"
301 section documents the keys which select a file or tag files as a
302 target for a later action (the action is usually one from the file
303 menu).
306 .\"LINK2"
307 Shell Command Line
308 .\"Shell Command Line"
309 section list the keys which are used for entering and editing command
310 lines. Most of these copy file names and such from the directory
311 panels to the command line (to avoid excessive typing) or access the
312 command line history.
314 .\"LINK2"
315 Input Line Keys
316 .\"Input Line Keys"
317 are used for editing input lines. This means both the command line and
318 the input lines in the query dialogs.
320 .\"NODE "  Keys_redefine"
321 .SH "  Redefine hotkey bindings"
322 Hotkey bindings may be readed from external file (keymap\-file).
323 A keymap\-file is searched on the following algorithm (to the first one found):
326 1) command line option
327 .BR \-K
328 .BR \<keymap\>
330 .BR \-\-keymap=\<keymap\>
332 2) Environment variable
333 .BR MC_KEYMAP
335 3) In config file parameter
336 .BR keymap
337 in section
338 .BR [Midhight Commander]
340 4) File
341 .BR ~/.mc/mc.keymap
343 5) File
344 .BR @sysconfdir@/mc/mc.keymap
346 6) File
347 .BR @prefix@/share/mc/mc.keymap
350 Command line option, environment variable and parameter in config file may
351 contain the absolute path to the keymap\-file (with the extension \.keymap
352 or without it). Search of keymap\-file will occur in (to the first one found):
355 .BR ~/.mc/
358 .BR @sysconfdir@/mc/
361 .BR @prefix@/share/mc/
364 .\"NODE "  Miscellaneous Keys"
365 .SH "  Miscellaneous Keys"
366 Here are some keys which don't fall into any of the other categories:
368 .B Enter
369 if there is some text in the command line (the one at the bottom of
370 the panels), then that command is executed. If there is no text in the
371 command line then if the selection bar is over a directory the
372 Midnight Commander does a
373 .B chdir(2)
374 to the selected directory and reloads the information on the panel;
375 if the selection is an executable file then it is executed. Finally,
376 if the extension of the selected file name matches one of the
377 extensions in the
378 .\"LINK2"
379 extensions file
380 .\"Extension File Edit"
381 then the corresponding command is executed.
383 .B C\-l
384 repaint all the information in the Midnight Commander.
386 .B C\-x c
387 run the
388 .\"LINK2"
389 Chmod
390 .\"Chmod"
391 command on a file or on the tagged files.
393 .B C\-x o
394 run the
395 .\"LINK2"
396 Chown
397 .\"Chown"
398 command on the current file or on the tagged files.
400 .B C\-x l
401 run the link command.
403 .B C\-x s
404 run the symbolic link command.
406 .B C\-x i
407 set the other panel display mode to information.
409 .B C\-x q
410 set the other panel display mode to quick view.
412 .B C\-x !
413 execute the
414 .\"LINK2"
415 External panelize
416 .\"External panelize"
417 command.
419 .B C\-x h
420 run the
421 .\"LINK2"
422 add directory to hotlist
423 .\"Hotlist"
424 command.
426 .B Alt\-!
427 executes the Filtered view command, described in the
428 .\"LINK2"
429 view command\&.
430 .\"Internal File Viewer"
432 .B Alt\-?
433 executes the
434 .\"LINK2"
435 Find file
436 .\"Find File"
437 command.
439 .B Alt\-c
440 pops up the
441 .\"LINK2"
442 quick cd
443 .\"Quick cd"
444 dialog.
446 .B C\-o
447 when the program is being run in the Linux or FreeBSD console or under
448 an xterm, it will show you the output of the previous command.  When ran
449 on the Linux console, the Midnight Commander uses an external program
450 (cons.saver) to handle saving and restoring of information on the
451 screen.
453 When the subshell support is compiled in, you can type C\-o at any time
454 and you will be taken back to the Midnight Commander main screen, to
455 return to your application just type C\-o.  If you have an application
456 suspended by using this trick, you won't be able to execute other
457 programs from the Midnight Commander until you terminate the suspended
458 application.
459 .\"NODE "  Directory Panels"
460 .SH "  Directory Panels"
461 This section lists the keys which operate on the directory panels. If
462 you want to know how to change the appearance of the panels take a
463 look at the section on
464 .\"LINK2"
465 Left and Right Menus\&.
466 .\"Left and Right Menus"
468 .B Tab, C\-i
469 change the current panel. The old other panel becomes the new current
470 panel and the old current panel becomes the new other panel. The
471 selection bar moves from the old current panel to the new current
472 panel.
474 .B Insert, C\-t
475 to tag files you may use the Insert key (the kich1 terminfo sequence).
476 To untag files, just retag a tagged file.
478 .B M\-e
479 to change charset of panel you may use M\-e (Alt\-e).
480 Recoding is made from selected codepage into system codepage. To
481 cancel the recoding you may select "directory up" (..) in active panel.
482 To cancel the charsets in all directories, select "No translation " in
483 the dialog of encodings.
485 .B Alt\-g, Alt\-r, Alt\-j
486 used to select the top file in a panel, the middle file and the bottom one,
487 respectively.
489 .B C\-s, Alt\-s
490 start a filename search in the directory listing. When the search is
491 active, the user input will be added to the search string instead of
492 the command line. If the
493 .I Show mini\-status
494 option is enabled the search string is shown on the mini\-status
495 line. When typing, the selection bar will move to the next file
496 starting with the typed letters. The
497 .I backspace
499 .I DEL
500 keys can be used to correct typing mistakes. If C\-s is pressed
501 again, the next match is searched for.
503 .B Alt\-t
504 toggle the current display listing to show the next display listing
505 mode.
506 With this it is possible to quickly switch to brief listing, long
507 listing, user defined listing mode, and back to the default.
509 .B C\-\\\\ (control\-backslash)
510 show the
511 .\"LINK2"
512 directory hotlist
513 .\"Hotlist"
514 and change to the selected directory.
516 .B + \ (plus)
517 this is used to select (tag) a group of files.  The Midnight Commander
518 will prompt for a selection options. When
519 .I Files only
520 checkbox is on, only files will be selected.  If
521 .I Files only
522 is off, as files as directories will be selected.
523 When
524 .I Shell Patterns
525 checkbox is on, the regular expression is much like the filename globbing
526 in the shell (* standing for zero or more characters and ? standing
527 for one character). If
528 .I Shell Patterns
529 is off, then the tagging of files is done with normal regular
530 expressions (see ed (1)). When
531 .I Case sensitive
532 checkbox is on, the selection will be case sensitive characters.
534 .I Case sensitive
535 is off, the case will be ignored.
537 .B \\\\ (backslash)
538 use the "\\" key to unselect a group of files. This is the opposite of
539 the Plus key.
541 .B up\-key, C\-p
542 move the selection bar to the previous entry in the panel.
544 .B down\-key, C\-n
545 move the selection bar to the next entry in the panel.
547 .B home, a1, Alt\-<
548 move the selection bar to the first entry in the panel.
550 .B end, c1, Alt\->
551 move the selection bar to the last entry in the panel.
553 .B next\-page, C\-v
554 move the selection bar one page down.
556 .B prev\-page, Alt\-v
557 move the selection bar one page up.
559 .B Alt\-o
560 If the currently selected file is a directory, load that directory on
561 the other panel and moves the selection to the next file. If the
562 currently selected file is not a directory, load the parent directory
563 on the other panel and moves the selection to the next file.
565 .B Alt\-i
566 make the current directory of the current panel also the current
567 directory of the other panel.  Put the other panel to the listing mode
568 if needed.  If the current panel is panelized, the other panel doesn't
569 become panelized.
571 .B C\-PageUp, C\-PageDown
572 only when supported by the terminal: change to ".." and to the currently
573 selected directory respectively.
575 .B Alt\-y
576 moves to the previous directory in the history, equivalent to clicking
578 .I <
579 with the mouse.
581 .B Alt\-u
582 moves to the next directory in the history, equivalent to clicking the
583 .I >
584 with the mouse.
586 .B Alt\-Shift\-h, Alt\-H
587 displays the directory history, equivalent to depressing the 'v' with
588 the mouse.
589 .\"NODE "  Shell Command Line"
590 .SH "  Shell Command Line"
591 This section lists keys which are useful to avoid excessive typing when
592 entering shell commands.
594 .B Alt\-Enter
595 copy the currently selected file name to the command line.
597 .B C\-Enter
598 same a Alt\-Enter.  May not work on remote systems and some terminals.
600 .B C\-Shift\-Enter
601 copy the full path name of the currently selected file to the command
602 line.  May not work on remote systems and some terminals.
604 .B Alt\-Tab
605 does the filename, command, variable, username and hostname
606 .\"LINK2"
607 completion
608 .\"Completion"
609 for you.
611 .B C\-x t, C\-x C\-t
612 copy the tagged files (or if there are no tagged files, the selected
613 file) of the current panel (C\-x t) or of the other panel (C\-x C\-t) to
614 the command line.
616 .B C\-x p, C\-x C\-p
617 the first key sequence copies the current path name to the command
618 line, and the second one copies the unselected panel's path name to
619 the command line.
621 .B C\-q
622 the quote command can be used to insert characters that are otherwise
623 interpreted by the Midnight Commander (like the '+' symbol)
625 .B Alt\-p, Alt\-n
626 use these keys to browse through the command history. Alt\-p takes you
627 to the last entry, Alt\-n takes you to the next one.
629 .B Alt\-h
630 displays the history for the current input line.
631 .\"NODE "  General Movement Keys"
632 .SH "  General Movement Keys"
633 The help viewer, the file viewer and the directory tree use common
634 code to handle moving. Therefore they accept exactly the same
635 keys. Each of them also accepts some keys of its own.
637 Other parts of the Midnight Commander use some of the same movement
638 keys, so this section may be of use for those parts too.
640 .B Up, C\-p
641 moves one line backward.
643 .B Down, C\-n
644 moves one line forward.
646 .B Prev Page, Page Up, Alt\-v
647 moves one page up.
649 .B Next Page, Page Down, C\-v
650 moves one page down.
652 .B Home, A1
653 moves to the beginning.
655 .B End, C1
656 move to the end.
658 The help viewer and the file viewer accept the following keys in
659 addition the to ones mentioned above:
661 .B b, C\-b, C\-h, Backspace, Delete
662 moves one page up.
664 .B Space bar
665 moves one page down.
667 .B u, d
668 moves one half of a page up or down.
670 .B g, G
671 moves to the beginning or to the end.
672 .\"NODE "  Input Line Keys"
673 .SH "  Input Line Keys"
674 The input lines (they are used for the
675 .\"LINK2"
676 command line
677 .\"Shell Command Line"
678 and for the query dialogs in the program) accept these keys:
680 .B C\-a
681 puts the cursor at the beginning of line.
683 .B C\-e
684 puts the cursor at the end of the line.
686 .B C\-b, move\-left
687 move the cursor one position left.
689 .B C\-f, move\-right
690 move the cursor one position right.
692 .B Alt\-f
693 moves one word forward.
695 .B Alt\-b
696 moves one word backward.
698 .B C\-h, backspace
699 delete the previous character.
701 .B C\-d, Delete
702 delete the character in the point (over the cursor).
704 .B C\-@
705 sets the mark for cutting.
707 .B C\-w
708 copies the text between the cursor and the mark to a kill buffer and
709 removes the text from the input line.
711 .B Alt\-w
712 copies the text between the cursor and the mark to a kill buffer.
714 .B C\-y
715 yanks back the contents of the kill buffer.
717 .B C\-k
718 kills the text from the cursor to the end of the line.
720 .B Alt\-p, Alt\-n
721 Use these keys to browse through the command history. Alt\-p takes you
722 to the last entry, Alt\-n takes you to the next one.
724 .B Alt\-C\-h, Alt\-Backspace
725 delete one word backward.
727 .B Alt\-Tab
728 does the filename, command, variable, username and hostname
729 .\"LINK2"
730 completion
731 .\"Completion"
732 for you.
733 .SH ""
734 .\"NODE "Menu Bar"
735 .SH "Menu Bar"
736 The menu bar pops up when you press F9 or click the mouse on the top
737 row of the screen. The menu bar has five menus: "Left", "File",
738 "Command", "Options" and "Right".
741 .\"LINK2"
742 Left and Right Menus
743 .\"Left and Right Menus"
744 allow you to modify the appearance of the left and right directory
745 panels.
748 .\"LINK2"
749 File Menu
750 .\"File Menu"
751 lists the actions you can perform on the currently selected file or
752 the tagged files.
755 .\"LINK2"
756 Command Menu
757 .\"Command Menu"
758 lists the actions which are more general and bear no relation to the
759 currently selected file or the tagged files.
762 .\"LINK2"
763 Options Menu
764 .\"Options Menu"
765 lists the actions which allow you to customize the Midnight Commander.
766 .\"NODE "  Left and Right Menus"
767 .SH "  Left and Right (Above and Below) Menus"
768 The outlook of the directory panels can be changed from the
769 .B Left
771 .B Right
772 menus (they are named
773 .B Above
775 .B Below
776 when the horizontal panel split is chosen from the
777 .\"LINK2"
778 Layout
779 .\"Layout"
780 options dialog).
781 .\"NODE "    Listing Mode..."
782 .SH "    Listing Mode..."
783 The listing mode view is used to display a listing of files, there are
784 four different listing modes available:
785 .BR Full ,
786 .BR Brief ,
787 .B Long
789 .BR User .
790 The full directory view shows the file name, the size of the file and
791 the modification time.
793 The brief view shows only the file name and it has two columns
794 (therefore showing twice as many files as other views). The long view
795 is similar to the output of
796 .B "ls \-l"
797 command. The long view takes the whole screen width.
799 If you choose the "User" display format, then you have to specify
800 the display format.
802 The user display format must start with a panel size specifier.  This
803 may be "half" or "full", and they specify a half screen panel and a
804 full screen panel respectively.
806 After the panel size, you may specify the two columns mode on the
807 panel, this is done by adding the number "2" to the user format
808 string.
810 After this you add the name of the fields with an optional size
811 specifier.  This are the available fields you may display:
813 .B name
814 displays the file name.
816 .B size
817 displays the file size.
819 .B bsize
820 is an alternative form of the
821 .B size
822 format. It displays the size of the files and for directories it just
823 shows SUB\-DIR or UP\-\-DIR.
825 .B type
826 displays a one character wide type field.  This character is similar to
827 what is displayed by ls with the \-F flag \-
828 .B *
829 for executable files,
830 .B /
831 for directories,
832 .B @
833 for links,
834 .B =
835 for sockets,
836 .B \-
837 for character devices,
838 .B +
839 for block devices,
840 .B |
841 for pipes,
842 .B ~
843 for symbolic links to directories and
844 .B !
845 for stale symlinks (links that point nowhere).
847 .B mark
848 an asterisk if the file is tagged, a space if it's not.
850 .B mtime
851 file's last modification time.
853 .B atime
854 file's last access time.
856 .B ctime
857 file's status change time.
859 .B perm
860 a string representing the current permission bits of the file.
862 .B mode
863 an octal value with the current permission bits of the file.
865 .B nlink
866 the number of links to the file.
868 .B ngid
869 the GID (numeric).
871 .B nuid
872 the UID (numeric).
874 .B owner
875 the owner of the file.
877 .B group
878 the group of the file.
880 .B inode
881 the inode of the file.
883 Also you can use following keywords to define the panel layout:
885 .B space
886 a space in the display format.
888 .B |
889 add a vertical line to the display format.
891 To force one field to a fixed size (a size specifier), you just add
892 .B :
893 followed by the number of characters you want the field to have.  If the
894 number is followed by the symbol
895 .BR + ,
896 then the size specifies the minimal field size \- if the program finds
897 out that there is more space on the screen, it will then expand that
898 field.
900 For example, the
901 .B Full
902 display corresponds to this format:
904 half type name | size | mtime
906 And the
907 .B Long
908 display corresponds to this format:
910 full perm space nlink space owner space group space size space mtime
911 space name
913 This is a nice user display format:
915 half name | size:7 | type mode:3
917 Panels may also be set to the following modes:
919 .B "Info"
920 The info view display information related to the currently
921 selected file and if possible information about the current file
922 system.
924 .B "Tree"
925 The tree view is quite similar to the
926 .\"LINK2"
927 directory tree
928 .\"Directory Tree"
929 feature. See the section about it for more information.
931 .B "Quick View"
932 In this mode, the panel will switch to a reduced
933 .\"LINK2"
934 viewer
935 .\"Internal File Viewer"
936 that displays the contents of the currently selected file, if you
937 select the panel (with the tab key or the mouse), you will have access
938 to the usual viewer commands.
939 .\"NODE "    Sort Order..."
940 .SH "    Sort Order..."
941 The eight sort orders are by name, by extension, by modification time,
942 by access time, and by inode information modification time, by size,
943 by inode and unsorted.  In the Sort order dialog box you can choose
944 the sort order and you may also specify if you want to sort in reverse
945 order by checking the reverse box.
947 By default directories are sorted before files but this can be changed
948 from the
949 .\"LINK2"
950 Options menu
951 .\"Options Menu"
952 (option
953 .BR "Mix all files" ).
954 .\"NODE "    Filter..."
955 .SH "    Filter..."
956 The filter command allows you to specify a shell pattern (for example
957 .BR "*.tar.gz" )
958 which the files must match to be shown. Regardless
959 of the filter pattern, the directories and the links to directories
960 are always shown in the directory panel.
961 .\"NODE "    Reread"
962 .SH "    Reread"
963 The reread command reload the list of files in the directory. It is
964 useful if other processes have created or removed files.  If you
965 have panelized file names in a panel this will reload the directory
966 contents and remove the panelized information (See the section
967 .\"LINK2"
968 External panelize
969 .\"External panelize"
970 for more information).
971 .\"NODE "  File Menu"
972 .SH "  File Menu"
973 The Midnight Commander uses the F1 \- F10 keys as keyboard shortcuts
974 for commands appearing in the file menu.  The escape sequences for the
975 function keys are terminfo capabilities kf1 trough kf10.  On terminals
976 without function key support, you can achieve the same functionality by
977 pressing the ESC key and then a number in the range 1 through 9 and 0
978 (corresponding to F1 to F9 and F10 respectively).
980 The File menu has the following commands (keyboard shortcuts in parentheses):
982 .B Help (F1)
984 Invokes the built\-in hypertext help viewer. Inside the
985 .\"LINK2"
986 help viewer\&,
987 .\"Contents"
988 you can use the Tab key to select the next link and the Enter key to
989 follow that link. The keys Space and Backspace are used to move
990 forward and backward in a help page. Press F1 again to get the full
991 list of accepted keys.
993 .B Menu (F2)
995 Invoke the
996 .\"LINK2"
997 user menu\&.
998 .\"Menu File Edit"
999 The user menu provides an easy way to provide users with a menu and
1000 add extra features to the Midnight Commander.
1002 .B View (F3, Shift\-F3)
1004 View the currently selected file. By default this invokes the
1005 .\"LINK2"
1006 Internal File Viewer
1007 .\"Internal File Viewer"
1008 but if the option "Use internal view" is off, it invokes an external
1009 file viewer specified by the
1010 .B VIEWER
1011 environment variable.  If
1012 .B VIEWER
1013 is undefined, the
1014 .B PAGER
1015 environment variable is tried.  If
1016 .B PAGER
1017 is also undefined, the "view" command is invoked.  If you use Shift\-F3
1018 instead, the viewer will be invoked without doing any formatting or
1019 preprocessing to the file.
1021 .B Filtered View (Alt\-!)
1023 This command prompts for a command
1024 and its arguments (the argument defaults to the currently selected
1025 file name), the output from such command is shown in the internal file
1026 viewer.
1028 .B Edit (F4, F14)
1030 Press F4 to edit the highlighted file.  Press F14 (usually Shift\-F4)
1031 to start the editor with a new, empty file.
1032 Currently they invoke the
1033 .B vi
1034 editor, or the editor specified in the
1035 .B EDITOR
1036 environment variable, or the
1037 .\"LINK2"
1038 Internal File Editor
1039 .\"Internal File Editor"
1040 if the use_internal_edit option is on.
1042 .B Copy (F5, F15)
1044 Press F5 to pop up an input dialog to copy the currently selected file (or
1045 the tagged files, if there is at least one file tagged) to the
1046 directory/filename you specify in the input dialog.  The destination
1047 defaults to the directory in the non\-selected panel. During this
1048 process, you can press C\-c or ESC to abort the operation. For details
1049 about source mask (which will be usually either * or ^\\(.*\\)$ depending
1050 on setting of Use shell patterns) and possible wildcards in the destination
1052 .\"LINK2"
1053 Mask copy/rename\&.
1054 .\"Mask Copy/Rename"
1056 F15 (usually Shift\-F5) is similar, but defaults to the directory in the
1057 selected panel. It always operates on the selected file, regardless of
1058 any tagged files.
1060 On some systems, it is possible to do the copy in the background by
1061 clicking on the background button (or pressing Alt\-b in the dialog
1062 box).  The
1063 .\"LINK2"
1064 Background Jobs
1065 .\"Background jobs"
1066 is used to control the background process.
1068 .B Link (C\-x l)
1070 Create a hard link to the current file.
1072 .B SymLink (C\-x s)
1074 Create a symbolic link to the current file. To those of you who don't
1075 know what links are: creating a link to a file is a bit like copying
1076 the file, but both the source filename and the destination filename
1077 represent the same file image. For example, if you edit one of these
1078 files, all changes you make will appear in both files. Some people call
1079 links aliases or shortcuts.
1081 A hard link appears as a real file. After making it, there is no way of
1082 telling which one is the original and which is the link. If you delete
1083 either one of them the other one is still intact. It is very difficult
1084 to notice that the files represent the same image. Use hard links when
1085 you don't even want to know.
1087 A symbolic link is a reference to the name of the original file. If
1088 the original file is deleted the symbolic link is useless. It is quite
1089 easy to notice that the files represent the same image. The Midnight
1090 Commander shows an "@"\-sign in front of the file name if it is a
1091 symbolic link to somewhere (except to directory, where it shows a tilde (~)).
1092 The original file which the link points to is shown on mini\-status line if the
1093 .I "Show mini\-status"
1094 option is enabled. Use symbolic links when you want to avoid the
1095 confusion that can be caused by hard links.
1097 .B Rename/Move (F6, F16)
1099 Press F6 to pop up an input dialog to copy the currently selected file (or
1100 the tagged files, if there is at least one file tagged) to the
1101 directory/filename you specify in the input dialog.  The destination
1102 defaults to the directory in the non\-selected panel. For more details
1103 look at Copy (F5) operation above, most of the things are quite similar.
1105 F16 (usually Shift\-F6) is similar, but defaults to the directory in the
1106 selected panel. It always operates on the selected file, regardless of
1107 any tagged files.
1109 On some systems, it is possible to do the copy in the background by
1110 clicking on the background button (or pressing Alt\-b in the dialog
1111 box).  The
1112 .\"LINK2"
1113 Background Jobs
1114 .\"Background jobs"
1115 is used to control the background process.
1117 .B Mkdir (F7)
1119 Pop up an input dialog and creates the directory specified.
1121 .B Delete (F8)
1123 Delete the currently selected file or the tagged files in the
1124 currently selected panel. During the process, you can press C\-c or
1125 ESC to abort the operation.
1127 .B Quick cd (Alt\-c)
1128 Use the
1129 .\"LINK2"
1130 quick cd
1131 .\"Quick cd"
1132 command if you have full command line and want to cd somewhere.
1134 .B Select group (+)
1136 This is used to select (tag) a group of files. The Midnight Commander
1137 will prompt for a selection options. When
1138 .I Files only
1139 checkbox is on, only files will be selected.  If
1140 .I Files only
1141 is off, as files as directories will be selected.
1142 When
1143 .I Shell Patterns
1144 checkbox is on, the regular expression is much like the filename globbing
1145 in the shell (* standing for zero or more characters and ?  standing
1146 for one character). If
1147 .I Shell Patterns
1148 is off, then the tagging of files is done with normal regular
1149 expressions (see ed (1)). When
1150 .I Case sensitive
1151 checkbox is on, the selection will be case sensitive characters.
1153 .I Case sensitive
1154 is off, the case will be ignored.
1156 .B Unselect group (\\\\)
1158 Used to unselect a group of files. This is the opposite of the
1159 .I "Select group"
1160 command.
1162 .B Quit (F10, Shift\-F10)
1164 Terminate the Midnight Commander.  Shift\-F10 is used when you want to
1165 quit and you are using the shell wrapper.  Shift\-F10 will not take you
1166 to the last directory you visited with the Midnight Commander, instead
1167 it will stay at the directory where you started the Midnight Commander.
1168 .\"NODE "    Quick cd"
1169 .SH "    Quick cd"
1170 This command is useful if you have a full command line and want to
1171 .\"LINK2"
1173 .\"The cd internal command"
1174 somewhere without having to yank and paste the command line. This command
1175 pops up a small dialog, where you enter everything you would enter after
1176 .B cd
1177 on the command line and then you press enter. This features all the things
1178 that are already in the
1179 .\"LINK2"
1180 internal cd command\&.
1181 .\"The cd internal command"
1182 .\"NODE "  Command Menu"
1183 .SH "  Command Menu"
1185 .\"LINK2"
1186 Directory tree
1187 .\"Directory Tree"
1188 command shows a tree figure of the directories.
1191 .\"LINK2"
1192 Find file
1193 .\"Find File"
1194 command allows you to search for a specific file.
1196 The "Swap panels" command swaps the contents of the two directory panels.
1198 The "Panels on/off" command shows the output of the last shell command.
1199 This works only on xterm and on Linux and FreeBSD console.
1201 The Compare directories (C\-x d) command compares the directory
1202 panels with each other. You can then use the Copy (F5) command to make
1203 the panels identical. There are three compare methods. The quick method
1204 compares only file size and file date. The thorough method makes a
1205 full byte\-by\-byte compare. The thorough method is not available if the
1206 machine does not support the mmap(2) system call.  The size\-only
1207 compare method just compares the file sizes and does not check the
1208 contents or the date times, it just checks the file size.
1210 The Command history command shows a list of typed commands. The
1211 selected command is copied to the command line. The command history
1212 can also be accessed by typing Alt\-p or Alt\-n.
1215 .\"LINK2"
1216 Directory hotlist (C\-\\)
1217 .\"Hotlist"
1218 command makes changing of the current directory to often used directories
1219 faster.
1222 .\"LINK2"
1223 External panelize
1224 .\"External panelize"
1225 allows you to execute an external program, and make the output of that
1226 program the contents of the current panel.
1228 .\"LINK2"
1229 Extension file edit
1230 .\"Extension File Edit"
1231 command allows you to specify programs to executed when you try to
1232 execute, view, edit and do a bunch of other thing on files
1233 with certain extensions (filename endings). The
1234 .\"LINK2"
1235 Menu file edit
1236 .\"Menu File Edit"
1237 command may be used for editing the user menu (which appears by
1238 pressing F2).
1239 .\"NODE "    Directory Tree"
1240 .SH "    Directory Tree"
1241 The Directory Tree command shows a tree figure of the directories. You
1242 can select a directory from the figure and the Midnight Commander will
1243 change to that directory.
1245 There are two ways to invoke the tree. The real directory tree command
1246 is available from Commands menu. The other way is to select tree view
1247 from the Left or Right menu.
1249 To get rid of long delays the Midnight Commander creates the tree
1250 figure by scanning only a small subset of all the directories. If the
1251 directory which you want to see is missing, move to its parent
1252 directory and press C\-r (or F2).
1254 You can use the following keys:
1256 .\"LINK2"
1257 General movement keys
1258 .\"General Movement Keys"
1259 are accepted.
1261 .B Enter.
1262 In the directory tree, exits the directory tree and changes to this
1263 directory in the current panel. In the tree view, changes to this
1264 directory in the other panel and stays in tree view mode in the
1265 current panel.
1267 .B C\-r, F2 (Rescan).
1268 Rescan this directory. Use this when the tree figure is out of date:
1269 it is missing subdirectories or shows some subdirectories which don't
1270 exist any more.
1272 .B F3 (Forget).
1273 Delete this directory from the tree figure. Use this to remove clutter
1274 from the figure. If you want the directory back to the tree figure
1275 press F2 in its parent directory.
1277 .B F4 (Static/Dynamic).
1278 Toggle between the dynamic navigation mode (default) and the static
1279 navigation mode.
1281 In the static navigation mode you can use the Up and Down keys to
1282 select a directory. All known directories are shown.
1284 In the dynamic navigation mode you can use the Up and Down keys to
1285 select a sibling directory, the Left key to move to the parent
1286 directory, and the Right key to move to a child directory. Only the
1287 parent, sibling and children directories are shown, others are left
1288 out. The tree figure changes dynamically as you traverse.
1290 .B F5 (Copy).
1291 Copy the directory.
1293 .B F6 (RenMov).
1294 Move the directory.
1296 .B F7 (Mkdir).
1297 Make a new directory below this directory.
1299 .B F8 (Delete).
1300 Delete this directory from the file system.
1302 .B C\-s, Alt\-s.
1303 Search the next directory matching the search string. If there is
1304 no such directory these keys will move one line down.
1306 .B C\-h, Backspace.
1307 Delete the last character of the search string.
1309 .B Any other character.
1310 Add the character to the search string and move to the next directory
1311 which starts with these characters. In the tree view you must first
1312 activate the search mode by pressing C\-s. The search string is shown
1313 in the mini status line.
1315 The following actions are available only in the directory tree. They
1316 aren't supported in the tree view.
1318 .B F1 (Help).
1319 Invoke the help viewer and show this section.
1321 .B Esc, F10.
1322 Exit the directory tree. Do not change the directory.
1324 The mouse is supported. A double\-click behaves like Enter. See
1325 also the section on
1326 .\"LINK2"
1327 mouse support\&.
1328 .\"Mouse Support"
1329 .\"NODE "    Find File"
1330 .SH "    Find File"
1331 The Find File feature first asks for the start directory for the
1332 search and the filename to be searched for. By pressing the Tree
1333 button you can select the start directory from the
1334 .\"LINK2"
1335 directory tree
1336 .\"Directory Tree"
1337 figure.
1339 The contents field accepts regular expressions similar to egrep(1). That
1340 means you have to escape characters with a special meaning to egrep with "\\",
1341 e.g. if you search for "strcmp (" you will have to input "strcmp \\("
1342 (without the double quotes).
1344 Option \"Whole words\" Allow select only those files containing matches that
1345 form whole words. Like grep \-w
1347 You can start the search by pressing the OK button.
1348 During the search you can stop from the Stop button and continue from
1349 the Start button.
1351 You can browse the filelist with the up and down arrow keys. The Chdir
1352 button will change to the directory of the currently selected
1353 file. The Again button will ask for the parameters for a new
1354 search. The Quit button quits the search operation. The Panelize
1355 button will place the found files to the current directory panel so
1356 that you can do additional operations on them (view, copy, move,
1357 delete and so on). After panelizing you can press C\-r to return to the
1358 normal file listing.
1360 It is possible to have a list of directories that the Find File command
1361 should skip during the search (for example, you may want to avoid
1362 searches on a CD\-ROM or on a NFS directory that is mounted across a slow
1363 link).
1365 Directories to be skipped should be set on the variable
1366 .B ignore_dirs
1367 in the
1368 .B FindFile
1369 section of your ~/.mc/ini file.
1371 Directory components should be separated with a colon, here is an
1372 example:
1375 [FindFile]
1376 ignore_dirs=/cdrom:/nfs/wuarchive:/afs
1379 You may consider using the
1380 .\"LINK2"
1381 External panelize
1382 .\"External panelize"
1383 command for some operations. Find file command is for simple queries
1384 only, while using External panelize you can do as mysterious searches
1385 as you would like.
1386 .\"NODE "    External panelize"
1387 .SH "    External panelize"
1388 The External panelize allows you to execute an external program, and
1389 make the output of that program the contents of the current panel.
1391 For example, if you want to manipulate in one of the panels all the
1392 symbolic links in the current directory, you can use external
1393 panelization to run the following command:
1396 find . \-type l \-print
1399 Upon command completion, the directory contents of the panel will no
1400 longer be the directory listing of the current directory, but all the
1401 files that are symbolic links.
1403 If you want to panelize all of the files that have been downloaded
1404 from your FTP server, you can use this awk command to extract the file
1405 name from the transfer log files:
1408 awk '$9 ~! /incoming/ { print $9 }' < /var/log/xferlog
1411 You may want to save often used panelize commands under a descriptive name,
1412 so that you can recall them quickly. You do this by typing the command on
1413 the input line and pressing Add new button. Then you enter a name under
1414 which you want the command to be saved. Next time, you just choose that
1415 command from the list and do not have to type it again.
1416 .\"NODE "    Hotlist"
1417 .SH "    Hotlist"
1418 The Directory hotlist command shows the labels of the directories
1419 in the directory hotlist.  The Midnight Commander will change to the
1420 directory corresponding to the selected label.  From the hotlist dialog,
1421 you can remove already created label/directory pairs and add new ones.
1422 To add new directories quickly, you can use the Add to hotlist command
1423 (C\-x h), which adds the current directory into the directory hotlist,
1424 asking just for the label for the directory.
1426 This makes cd to often used directories faster. You may consider using the
1427 CDPATH variable as described in
1428 .\"LINK2"
1429 internal cd command
1430 .\"The cd internal command"
1431 description.
1432 .\"NODE "    Extension File Edit"
1433 .SH "    Extension File Edit"
1434 This will invoke your editor on the file
1435 .IR ~/.mc/bindings .
1436 The format of this file following:
1438 All lines starting with # or empty lines are thrown away.
1440 Lines starting in the first column should have following format:
1442 .IR keyword/expr ,
1443 i.e. everything after the slash until new line is
1444 .IR expr .
1446 .I keyword
1447 can be:
1449 .I shell
1451 .I expr
1452 is an extension (no wildcards).  File matches it its name ends
1453 with
1454 .IR expr .
1455 Example:
1456 .I shell/.tar
1457 matches
1458 .IR *.tar .
1460 .I regex
1462 .I expr
1463 is a regular expression.  File matches if its name matches the regular
1464 expression.
1466 .I directory
1468 .I expr
1469 is a regular expression.  File matches if it is a directory and its name
1470 matches the regular expression.
1472 .I type
1474 .I expr
1475 is a regular expression.  File matches if the output of
1476 .I file %f
1477 without the initial "filename:" part matches regular expression
1478 .IR expr .
1480 .I default
1481 \- matches any file.
1482 .I expr
1483 is ignored.
1485 .I include
1486 \- denotes a common section.
1487 .I expr
1488 is the name of the section.
1490 Other lines should start with a space or tab and should be of the format:
1491 .I keyword=command
1492 (with no spaces around =), where
1493 .I keyword
1494 should be:
1495 .I Open
1496 (invoked on Enter or double click),
1497 .I View
1498 (F3),
1499 .I Edit
1500 (F4) or
1501 .I Include
1502 (to add rules from the common section).
1503 .I command
1504 is any one\-line shell command, with the simple
1505 .\"LINK2"
1506 macro substitution\&.
1507 .\"Macro Substitution"
1509 Rules are matched from top to bottom, thus the order is important.  If
1510 the appropriate action is missing, search continues as if this rule
1511 didn't match (i.e. if a file matches the first and second entry and View
1512 action is missing in the first one, then on pressing F3 the View action
1513 from the second entry will be used).
1514 .I default
1515 should match all the actions.
1516 .\"NODE "    Background jobs"
1517 .SH "    Background Jobs"
1518 This lets you control the state of any background Midnight Commander
1519 process (only copy and move files operations can be done in the
1520 background).  You can stop, restart and kill a background job from
1521 here.
1522 .\"NODE "    Menu File Edit"
1523 .SH "    Menu File Edit"
1524 The user menu is a menu of useful actions that can be customized by
1525 the user. When you access the user menu, the
1526 file .mc.menu from the current directory is used if it exists,
1527 but only if it is owned by user or root and is not world\-writable.
1528 If no such file found, ~/.mc/menu is tried in the same way,
1529 and otherwise mc uses the default system\-wide menu
1530 @prefix@/share/mc/mc.menu.
1532 The format of the menu file is very simple. Lines that start with
1533 anything but space or tab are considered entries for the menu (in
1534 order to be able to use it like a hot key, the first character should
1535 be a letter). All the lines that start with a space or a tab are the
1536 commands that will be executed when the entry is selected.
1538 When an option is selected all the command lines of the option are
1539 copied to a temporary file in the temporary directory (usually
1540 /usr/tmp) and then that file is executed. This allows the user to put
1541 normal shell constructs in the menus. Also simple macro substitution
1542 takes place before executing the menu code. For more information, see
1543 .\"LINK2"
1544 macro substitution\&.
1545 .\"Macro Substitution"
1547 Here is a sample mc.menu file:
1550 A       Dump the currently selected file
1551         od \-c %f
1553 B       Edit a bug report and send it to root
1554         I=`mktemp ${MC_TMPDIR:\-/tmp}/mail.XXXXXX` || exit 1
1555         vi $I
1556         mail \-s "Midnight Commander bug" root < $I
1557         rm \-f $I
1559 M       Read mail
1560         emacs \-f rmail
1562 N       Read Usenet news
1563         emacs \-f gnus
1565 H       Call the info hypertext browser
1566         info
1568 J       Copy current directory to other panel recursively
1569         tar cf \- . | (cd %D && tar xvpf \-)
1571 K       Make a release of the current subdirectory
1572         echo \-n "Name of distribution file: "
1573         read tar
1574         ln \-s %d `dirname %d`/$tar
1575         cd ..
1576         tar cvhf ${tar}.tar $tar
1578 = f *.tar.gz | f *.tgz & t n
1579 X       Extract the contents of a compressed tar file
1580         tar xzvf %f
1583 .B Default Conditions
1585 Each menu entry may be preceded by a condition. The condition must
1586 start from the first column with a '=' character. If the condition is
1587 true, the menu entry will be the default entry.
1590 Condition syntax:       = <sub\-cond>
1591   or:                   = <sub\-cond> | <sub\-cond> ...
1592   or:                   = <sub\-cond> & <sub\-cond> ...
1594 Sub\-condition is one of following:
1596   y <pattern>           syntax of current file matching pattern?
1597                         (for edit menu only)
1598   f <pattern>           current file matching pattern?
1599   F <pattern>           other file matching pattern?
1600   d <pattern>           current directory matching pattern?
1601   D <pattern>           other directory matching pattern?
1602   t <type>              current file of type?
1603   T <type>              other file of type?
1604   x <filename>          is it executable filename?
1605   ! <sub\-cond>         negate the result of sub\-condition
1608 Pattern is a normal shell pattern or a regular expression, according
1609 to the shell patterns option. You can override the global value of
1610 the shell patterns option by writing "shell_patterns=x" on the first
1611 line of the menu file (where "x" is either 0 or 1).
1613 Type is one or more of the following characters:
1616   n     not a directory
1617   r     regular file
1618   d     directory
1619   l     link
1620   c     character device
1621   b     block device
1622   f     FIFO (pipe)
1623   s     socket
1624   x     executable file
1625   t     tagged
1628 For example 'rlf' means either regular file, link or fifo. The 't'
1629 type is a little special because it acts on the panel instead of the
1630 file. The condition '=t t' is true if there are tagged files in the
1631 current panel and false if not.
1633 If the condition starts with '=?' instead of '=' a debug trace will be
1634 shown whenever the value of the condition is calculated.
1636 The conditions are calculated from left to right. This means
1638         = f *.tar.gz | f *.tgz & t n
1640 is calculated as
1642         ( (f *.tar.gz) | (f *.tgz) ) & (t n)
1645 Here is a sample of the use of conditions:
1648 = f *.tar.gz | f *.tgz & t n
1649 L       List the contents of a compressed tar\-archive
1650         gzip \-cd %f | tar xvf \-
1653 .B Addition Conditions
1655 If the condition begins with '+' (or '+?') instead of '=' (or '=?') it
1656 is an addition condition. If the condition is true the menu entry will
1657 be included in the menu. If the condition is false the menu entry will
1658 not be included in the menu.
1660 You can combine default and addition conditions by starting condition
1661 with '+=' or '=+' (or '+=?' or '=+?' if you want debug trace). If you
1662 want to use two different conditions, one for adding and another for
1663 defaulting, you can precede a menu entry with two condition lines, one
1664 starting with '+' and another starting with '='.
1666 Comments are started with '#'. The additional comment lines must start
1667 with '#', space or tab.
1668 .\"NODE "  Options Menu"
1669 .SH "  Options Menu"
1670 The Midnight Commander has some options that may be toggled on and
1671 off in several dialogs which are accessible from this menu. Options
1672 are enabled if they have an asterisk or "x" in front of them.
1675 .\"LINK2"
1676 Configuration
1677 .\"Configuration"
1678 command pops up a dialog from which you can change most of settings of
1679 the Midnight Commander.
1682 .\"LINK2"
1683 Layout
1684 .\"Layout"
1685 command pops up a dialog from which you specify a bunch of options how mc
1686 looks like on the screen.
1689 .\"LINK2"
1690 Confirmation
1691 .\"Confirmation"
1692 command pops up a dialog from which you specify which actions you want to
1693 confirm.
1696 .\"LINK2"
1697 Display bits
1698 .\"Display bits"
1699 command pops up a dialog from which you may select which characters is your
1700 terminal able to display.
1703 .\"LINK2"
1704 Learn keys
1705 .\"Learn keys"
1706 command pops up a dialog from which you test some keys which are not working
1707 on some terminals and you may fix them.
1710 .\"LINK2"
1711 Virtual FS
1712 .\"Virtual FS"
1713 command pops up a dialog from which you specify some VFS related options.
1716 .\"LINK2"
1717 Save setup
1718 .\"Save Setup"
1719 command saves the current settings of the Left, Right and Options
1720 menus. A small number of other settings is saved, too.
1721 .\"NODE "    Configuration"
1722 .SH "    Configuration"
1723 The options in this dialog are divided into three groups:
1724 Panel Options, Pause after run and Other Options.
1726 .B Panel Options
1728 .I Use SI size units.
1729 If this option is set, Midnight Commander will use SI units (powers of 1000)
1730 when displaying any byte sizes. The suffixes (k, m ...) are shown in lowercase.
1731 If unset (default), Midnight Commander will use binary units (powers of 1024)
1732 and the suffixes are shown in upper case (K, M ...)
1734 .I Show Backup Files.
1735 If enabled, the Midnight Commander will show files ending with a tilde.
1736 Otherwise, they won't be shown (like GNU's ls option \-B).
1738 .I Show Hidden Files.
1739 If enabled, the Midnight Commander will show all files that start with
1740 a dot (like ls \-a).
1742 .I Mark moves down.
1743 If enabled, the selection bar will move down when you mark a file (with
1744 Insert key).
1746 .I Drop down menus.
1747 When this option is enabled, the pull down menus will be activated as
1748 soon as you press the
1749 .B F9
1750 key.  Otherwise, you will only get the menu title, and you will have
1751 to activate the menu either with the arrow keys or with the hotkeys.
1752 It is recommended if you are using hotkeys.
1754 .I Mix all files.
1755 If this option is enabled, all files and directories are shown mixed
1756 together.  If the option is off, directories (and links to directories)
1757 are shown at the beginning of the listing, and other files below.
1759 .I Fast directory reload.
1760 If this option is enabled, the Midnight Commander will use a trick to
1761 determine if the directory contents have changed.  The trick is to reload
1762 the directory only if the i\-node of the directory has changed; this means
1763 that reloads only happen when files are created or deleted.  If what
1764 changes is the i\-node for a file in the directory (file size changes,
1765 mode or owner changes, etc) the display is not updated.  In these cases,
1766 if you have the option on, you have to rescan the directory manually
1767 (with C\-r).
1769 .B Pause after run
1771 After executing your commands, the Midnight Commander can pause, so
1772 that you can examine the output of the command.  There are three
1773 possible settings for this variable:
1775 .I Never.
1776 Means that you do not want to see the output of your command.  If you
1777 are using the Linux or FreeBSD console or an xterm, you will be able to
1778 see the output of the command by typing C\-o.
1780 .I On dumb terminals.
1781 You will get the pause message on terminals that are not capable of
1782 showing the output of the last command executed (any terminal that is
1783 not an xterm or the Linux console).
1785 .I Always.
1786 The program will pause after executing all of your commands.
1788 .B Other Options
1790 .I Verbose operation.
1791 This toggles whether the file Copy, Rename and Delete operations are
1792 verbose (i.e., display a dialog box for each operation). If you have a
1793 slow terminal, you may wish to disable the verbose operation. It is
1794 automatically turned off if the speed of your terminal is less than
1795 9600 bps.
1797 .I Compute totals.
1798 If this option is enabled, the Midnight
1799 Commander computes total byte sizes and total number of files
1800 prior to any Copy, Rename and Delete operations. This will
1801 provide you with a more accurate progress bar at the expense
1802 of some speed. This option has no effect, if
1803 .I Verbose operation
1804 is disabled.
1806 .I Shell Patterns.
1807 By default the Select, Unselect and Filter commands will use shell\-like
1808 regular expressions. The following conversions are performed to achieve
1809 this: the '*' is replaced by '.*' (zero or more characters); the '?'
1810 is replaced by '.' (exactly one character) and '.' by the literal
1811 dot. If the option is disabled, then the regular expressions are the
1812 ones described in ed(1).
1814 .I Auto Save Setup.
1815 If this option is enabled, when you exit the Midnight Commander the
1816 configurable options of the Midnight Commander are saved in the
1817 ~/.mc/ini file.
1819 .I Auto menus.
1820 If this option is enabled, the user menu will be invoked at startup.
1821 Useful for building menus for non\-unixers.
1823 .I Use internal editor.
1824 If this option is enabled, the built\-in file editor is used to edit
1825 files. If the option is disabled, the editor specified in the
1826 .B EDITOR
1827 environment variable is used.
1828 If no editor is specified,
1829 .B vi
1830 is used.  See the section on the
1831 .\"LINK2"
1832 internal file editor\&.
1833 .\"Internal File Editor"
1835 .I Use internal viewer.
1836 If this option is enabled, the built\-in file viewer is used to view
1837 files. If the option is disabled, the pager specified in the
1838 .B PAGER
1839 environment variable is used.
1840 If no pager is specified, the
1841 .B view
1842 command is used.  See the section on the
1843 .\"LINK2"
1844 internal file viewer\&.
1845 .\"Internal File Viewer"
1847 .I Complete: show all.
1848 By default the Midnight Commander pops up all possible
1849 .\"LINK2"
1850 completions
1851 .\"Completion"
1852 if the completion is ambiguous only when you press
1853 .B Alt\-Tab
1854 for the second time.  For the first time, it just completes as much as
1855 possible and beeps in the case of ambiguity.  Enable this option if you
1856 want to see all possible completions even after pressing
1857 .B Alt\-Tab
1858 the first time.
1860 .I Rotating dash.
1861 If this option is enabled, the
1862 Midnight Commander shows a rotating dash in the upper right corner
1863 as a work in progress indicator.
1865 .I Lynx\-like motion.
1866 If this option is enabled,
1867 you may use the arrows keys to automatically chdir if the
1868 current selection is a subdirectory and the shell command
1869 line is empty. By default, this setting is off.
1871 .I Cd follows links.
1872 This option, if set, causes the Midnight Commander to follow the
1873 logical chain of directories when changing current directory
1874 either in the panels, or using the cd command. This is the default
1875 behavior of bash. When unset, the Midnight Commander follows the
1876 real directory structure, so cd .. if you've entered that directory
1877 through a link will move you to the current directory's real parent
1878 and not to the directory where the link was present.
1880 .I Safe delete.
1881 If this option is enabled, deleting files and directory hotlist entries
1882 unintentionally becomes more difficult.  The default selection in the
1883 confirmation dialogs for deletion changes from "Yes" to "No".
1884 This option is disabled by default.
1885 .\"NODE "    Layout"
1886 .SH "    Layout"
1887 The layout dialog gives you a possibility to change the general layout
1888 of screen. You can specify whether the menubar, the command prompt, the
1889 hintbar and the function keybar are visible. On the Linux or FreeBSD
1890 console you can specify how many lines are shown in the output window.
1892 The rest of the screen area is used for the two directory panels. You
1893 can specify whether the area is split to the panels in vertical or
1894 horizontal direction. The split can be equal or you can specify an
1895 unequal split.
1897 You can specify whether
1898 .I permissions
1900 .I file types
1901 should be highlighted with distinctive
1902 .\"LINK2"
1903 Colors\&.
1904 .\"Colors"
1905 If the permission highlighting is enabled, the parts of the
1906 .I perm
1908 .I mode
1909 .\"LINK2"
1910 display fields
1911 .\"Listing Mode..."
1912 which apply to the user running Midnight Commander are highlighted with
1913 the color defined by the
1914 .I selected
1915 keyword.  If the file type highlighting is enabled, file names are colored
1916 according to rules described in @sysconfdir@/mc/filehighlight.ini file. See
1917 .\"LINK2"
1918 Filenames Highlight
1919 .\"Filenames Highlight"
1920 for more info.
1922 If the
1923 .I Show Mini\-Status
1924 option is enabled, one line of status information about the currently
1925 selected item is shown at the bottom of the panels.
1927 When run in a terminal emulator for X11, Midnight Commander sets the
1928 terminal window title to the current working directory and updates it
1929 when necessary.  If your terminal emulator is broken and you see some
1930 incorrect output on startup and directory change, turn off the
1931 .I Xterm Window Title
1932 option.
1933 .\"NODE "    Confirmation"
1934 .SH "    Confirmation"
1935 In this dialog you configure the confirmation options for file deletion,
1936 overwriting files, execution by pressing enter, quitting the program,
1937 directory hotlist entries deletion and history cleanup.
1938  and.
1939 .\"NODE "    Display bits"
1940 .SH "    Display bits"
1941 This is used to configure the range of visible characters on the
1942 screen.  This setting may be 7\-bits if your terminal/curses supports
1943 only seven output bits, ISO\-8859\-1 displays all the characters in the
1944 ISO\-8859\-1 map and full 8 bits is for those terminals that can display
1945 full 8 bit characters.
1946 .\"NODE "    Learn keys"
1947 .SH "    Learn keys"
1948 This dialog allows you to test and redefine functional keys, cursor
1949 arrows and some other keys to make them work properly on your terminal.
1950 They often don't, since many terminal databases are incomplete or broken.
1952 You can move around with the Tab key and with the vi moving keys ('h'
1953 left, 'j' down, 'k' up and 'l' right).  Once you press any cursor movement
1954 key and it is recognized, you can use that key as well.
1956 You can test keys just by pressing each of them.  When you press a
1957 key and it is recognized properly, OK should appear next to the name
1958 of that key.  Once a key is marked OK it starts working as usually,
1959 e.g. F1 pressed the first time will just check that the F1 key works,
1960 but after that it will show help.  The same applies to the arrow keys.
1961 The Tab key should be working always.
1963 If some keys do not work properly then you won't see OK appear after
1964 pressing one of these.  Then you may want to redefine it.  Do it by pressing
1965 the button with the name of that key (either by the mouse or by Enter
1966 or Space after selecting the button with Tab or arrows).  Then a message
1967 box will appear asking you to press that key.  Do it and wait until the
1968 message box disappears.  If you want to abort, just press Escape once
1969 and wait.
1971 When you finish with all the keys, you can Save them.  The definitions
1972 for the keys you have redefined will be written into the [terminal:TERM]
1973 section of your ~/.mc/ini file (where TERM is the name of your current
1974 terminal).  The definitions of the keys that were already working properly
1975 are not saved.
1976 .\"NODE "    Virtual FS"
1977 .SH "    Virtual FS"
1978 This option gives you control over the settings of the
1979 .\"LINK2"
1980 Virtual File System\&.
1981 .\"Virtual File System"
1983 The Midnight Commander keeps in memory the information related to some
1984 of the virtual file systems to speed up the access to the files in the
1985 file system (for example, directory listings fetched from FTP servers).
1987 Also, in order to access the contents of compressed files (for example,
1988 compressed tar files) the Midnight Commander needs to create temporary
1989 uncompressed files on your disk.
1991 Since both the information in memory and the temporary files on disk
1992 take up resources, you may want to tune the parameters of the cached
1993 information to decrease your resource usage or to maximize the speed of
1994 access to frequently used file systems.
1996 Because of the format of the tar archives, the
1997 .I Tar filesystem
1998 needs to read the whole file just to load the file entries.  Since most
1999 tar files are usually kept compressed (plain tar files are species in
2000 extinction), the tar file system has to uncompress the file on the disk
2001 in a temporary location and then access the uncompressed file as a
2002 regular tar file.
2004 Now, since we all love to browse files and tar files all over the disk,
2005 it's common that you will leave a tar file and the re\-enter it later.
2006 Since decompression is slow, the Midnight Commander will cache the
2007 information in memory for a limited time.  When the timeout expires, all
2008 the resources associated with the file system are released.  The default
2009 timeout is set to one minute.
2012 .\"LINK2"
2013 FTP File System
2014 .\"FTP File System"
2015 (ftpfs) allows you to browse directories on remote FTP servers.  It has
2016 several options.
2018 .I ftp anonymous password
2019 is the password used when you login as "anonymous".  Some sites require
2020 a valid e\-mail address.  On the other hand, you probably don't want to
2021 give your real e\-mail address to untrusted sites, especially if you are
2022 not using spam filtering.
2024 ftpfs keeps the directory listing it fetches from a FTP server in a cache.
2025 The cache expire time is configurable with the
2026 .I ftpfs directory cache timeout
2027 option.  A low value for this option may slow down every operation on
2028 the ftpfs because every operation would require sending a request to the
2029 FTP server.
2031 You can define an FTP proxy host for doing FTP.  Note that most modern
2032 firewalls are fully transparent at least for passive FTP (see below), so
2033 FTP proxies are considered obsolete.
2036 .I Always use ftp proxy
2037 is not set, you can use the exclamation sign to enable proxy for certain
2038 hosts.  See
2039 .\"LINK2"
2040 FTP File System
2041 .\"FTP File System"
2042 for examples.
2044 If this option is set, the program will do two things: consult the
2045 @prefix@/lib/mc/mc.no_proxy file for lines containing host names that
2046 are local (if the host name starts with a dot, it is assumed to be a
2047 domain) and to assume that any hostnames without dots in their names are
2048 directly accessible.  All other hosts will be accessed through the
2049 specified FTP proxy.
2051 You can enable using
2052 .I ~/.netrc
2053 file, which keeps login names and passwords for ftp servers.  See netrc
2054 (5) for the description of the .netrc format.
2056 .I Use passive mode
2057 enables using FTP passive mode, when the connection for data transfer is
2058 initiated by the client, not by the server.  This option is recommended
2059 and enabled by default.  If this option is turned off, the data
2060 connection is initiated by the server.  This may not work with some
2061 firewalls.
2062 .\"NODE "    Save Setup"
2063 .SH "    Save Setup"
2064 At startup the Midnight Commander will try to load initialization
2065 information from the ~/.mc/ini file. If this file doesn't exist, it will
2066 load the information from the system\-wide configuration file, located in
2067 @prefix@/share/mc/mc.ini. If the system\-wide configuration file doesn't
2068 exist, MC uses the default settings.
2071 .I Save Setup
2072 command creates the ~/.mc/ini file by saving the current settings
2073 of the
2074 .\"LINK2"
2075 Left, Right
2076 .\"Left and Right Menus"
2078 .\"LINK2"
2079 Options
2080 .\"Options Menu"
2081 menus.
2083 If you activate the
2084 .I auto save setup
2085 option, MC will always save the current settings when exiting.
2087 There also exist settings which can't be changed from the menus. To
2088 change these settings you have to edit the setup file with your
2089 favorite editor. See the section on
2090 .\"LINK2"
2091 Special Settings
2092 .\"Special Settings"
2093 for more information.
2094 .SH ""
2095 .\"NODE "Executing operating system commands"
2096 .SH "Executing operating system commands"
2097 You may execute commands by typing them directly in the Midnight
2098 Commander's input line, or by selecting the program you want to
2099 execute with the selection bar in one of the panels and hitting Enter.
2101 If you press Enter over a file that is not executable, the Midnight
2102 Commander checks the extension of the selected file against the
2103 extensions in the
2104 .\"LINK2"
2105 Extensions File\&.
2106 .\"Extension File Edit"
2107 If a match is found then the code associated with that extension is
2108 executed. A very simple
2109 .\"LINK2"
2110 macro expansion
2111 .\"Macro Substitution"
2112 takes place before executing the command.
2113 .\"NODE "  The cd internal command"
2114 .SH "  The cd internal command"
2116 .I cd
2117 command is interpreted by the Midnight Commander, it is not passed to
2118 the command shell for execution.  Thus it may not handle all of the
2119 nice macro expansion and substitution that your shell does, although it
2120 does some of them:
2122 .I Tilde substitution.
2123 The (~) will be substituted with your home directory, if you append a
2124 username after the tilde, then it will be substituted with the login
2125 directory of the specified user.
2127 For example, ~guest is the home directory for the user guest, while
2128 ~/guest is the directory guest in your home directory.
2130 .I Previous directory.
2131 You can jump to the directory you were previously by using the special
2132 directory name '\-' like this:
2133 .B cd \-
2135 .I CDPATH directories.
2136 If the directory specified to the
2137 .B cd
2138 command is not in the current directory, then The Midnight Commander
2139 uses the value in the environment variable
2140 .B CDPATH
2141 to search for the directory in any of the named directories.
2143 For example you could set your
2144 .B CDPATH
2145 variable to ~/src:/usr/src, allowing you to change your directory to
2146 any of the directories inside the ~/src and /usr/src directories, from
2147 any place in the file system by using its relative name (for example
2148 cd linux could take you to /usr/src/linux).
2149 .\"NODE "  Macro Substitution"
2150 .SH "  Macro Substitution"
2151 When accessing a
2152 .\"LINK2"
2153 user menu\&,
2154 .\"Menu File Edit"
2155 or executing an
2156 .\"LINK2"
2157 extension dependent command\&,
2158 .\"Extension File Edit"
2159 or running a command from the command line input, a simple macro
2160 substitution takes place.
2162 The macros are:
2164 .I %i
2165 The indent of blank space, equal the cursor column position.  For edit
2166 menu only.
2168 .I %y
2169 The syntax type of current file. For edit menu only.
2171 .I %k
2172 The block file name.
2174 .I %e
2175 The error file name.
2177 .I %m
2178 The current menu name.
2180 .IR %f " and " %p
2181 The current file name.
2183 .I %x
2184 The extension of current file name.
2186 .I %b
2187 The current file name without extension.
2189 .I %d
2190 The current directory name.
2192 .I %F
2193 The current file in the unselected panel.
2195 .I %D
2196 The directory name of the unselected panel.
2198 .I %t
2199 The currently tagged files.
2201 .I %T
2202 The tagged files in the unselected panel.
2204 .IR %u " and " %U
2205 Similar to the %t and %T macros, but in addition the files are untagged.
2206 You can use this macro only once per menu file entry or extension file
2207 entry, because next time there will be no tagged files.
2209 .IR %s " and " %S
2210 The selected files: The tagged files if there are any. Otherwise the
2211 current file.
2213 .I %cd
2214 This is a special macro that is used to change the current directory
2215 to the directory specified in front of it.  This is used primarily as
2216 an interface to the
2217 .\"LINK2"
2218 Virtual File System\&.
2219 .\"Virtual File System"
2221 .I %view
2222 This macro is used to invoke the internal viewer.  This macro can be
2223 used alone, or with arguments.  If you pass any arguments to this
2224 macro, they should be enclosed in brackets.
2226 The arguments are:
2227 .I ascii
2228 to force the viewer into ascii mode;
2229 .I hex
2230 to force the viewer into hex mode;
2231 .I nroff
2232 to tell the viewer that it should interpret the bold and underline
2233 sequences of nroff;
2234 .I unformatted
2235 to tell the viewer to not interpret nroff commands for making the text
2236 bold or underlined.
2238 .I %%
2239 The % character
2241 .I %{some text}
2242 Prompt for the substitution. An input box is shown and the text inside
2243 the braces is used as a prompt. The macro is substituted by the text
2244 typed by the user. The user can press ESC or F10 to cancel. This macro
2245 doesn't work on the command line yet.
2247 .I %var{ENV:default}
2248 If environment variable
2249 .I ENV
2250 is unset, the
2251 .I default
2252 is substituted.  Otherwise, the value of
2253 .I ENV
2254 is substituted.
2255 .\"NODE "  The subshell support"
2256 .SH "  The subshell support"
2257 The subshell support is a compile time option, that works with the
2258 shells: bash, tcsh and zsh.
2260 When the subshell code is activated the Midnight Commander will
2261 spawn a concurrent copy of your shell (the one defined in the
2262 .B SHELL
2263 variable and if it is not defined, then the one in the /etc/passwd
2264 file) and run it in a pseudo terminal, instead of invoking a new shell
2265 each time you execute a command, the command will be passed to the
2266 subshell as if you had typed it.  This also allows you to change the
2267 environment variables, use shell functions and define aliases that are
2268 valid until you quit the Midnight Commander.
2270 If you are using
2271 .B bash
2272 you can specify startup
2273 commands for the subshell in your ~/.mc/bashrc file and
2274 special keyboard maps in the ~/.mc/inputrc file.
2275 .B tcsh
2276 users may specify startup commands in the ~/.mc/tcshrc file.
2278 When the subshell code is used, you can suspend applications at any
2279 time with the sequence C\-o and jump back to the Midnight Commander, if
2280 you interrupt an application, you will not be able to run other
2281 external commands until you quit the application you interrupted.
2283 An extra added feature of using the subshell is that the prompt
2284 displayed by the Midnight Commander is the same prompt that you are
2285 currently using in your shell.
2288 .\"LINK2"
2289 OPTIONS
2290 .\"OPTIONS"
2291 section has more information on how you can control the subshell code.
2292 .\"NODE "Chmod"
2293 .SH "Chmod"
2294 The Chmod window is used to change the attribute bits in a group of
2295 files and directories.  It can be invoked with the C\-x c key combination.
2297 The Chmod window has two parts \-
2298 .I Permissions
2300 .IR File .
2302 In the File section are displayed the name of the file or directory
2303 and its permissions in octal form, as well as its owner and group.
2305 In the Permissions section there is a set of check buttons which
2306 correspond to the file attribute bits.  As you change the attribute
2307 bits, you can see the octal value change in the File section.
2309 To move between the widgets (buttons and check buttons) use the
2310 .I arrow keys
2311 or the
2312 .I Tab
2313 key.  To change the state of the check buttons or to select a button
2315 .I Space.
2316 You can also use the hotkeys on the buttons to quickly activate them.
2317 Hotkeys are shown as highlighted letters on the buttons.
2319 To set the attribute bits, use the Enter key.
2321 When working with a group of files or directories, you just click on
2322 the bits you want to set or clear.  Once you have selected the bits
2323 you want to change, you select one of the action buttons (Set marked
2324 or Clear marked).
2326 Finally, to set the attributes exactly to those specified, you can use
2328 .B [Set all]
2329 button, which will act on all the tagged files.
2331 .B [Marked all]
2332 set only marked attributes to all selected files
2334 .B [Set marked]
2335 set marked bits in attributes of all selected files
2337 .B [Clean marked]
2338 clear marked bits in attributes of all selected files
2340 .B [Set]
2341 set the attributes of one file
2343 .B [Cancel]
2344 cancel the Chmod command
2345 .\"NODE "Chown"
2346 .SH "Chown"
2347 The Chown command is used to change the owner/group of a file. The hot
2348 key for this command is C\-x o.
2349 .\"NODE "Advanced Chown"
2350 .SH "Advanced Chown"
2351 The Advanced Chown command is the
2352 .\"LINK2"
2353 Chmod
2354 .\"Chmod"
2356 .\"LINK2"
2357 Chown
2358 .\"Chown"
2359 command combined into one window. You can change the permissions and
2360 owner/group of files at once.
2361 .\"NODE "File Operations"
2362 .SH "File Operations"
2363 When you copy, move or delete files the Midnight Commander shows the
2364 file operations dialog.  It shows the files currently being processed
2365 and uses up to three progress bars.  The file bar indicates the
2366 percentage of the current file that has been processed so far.  The
2367 count bar shows how many of the tagged files have been handled.  The
2368 bytes bar indicates the percentage of the total size of the tagged files
2369 that has been handled.  If the verbose option is off, the file and bytes
2370 bars are not shown.
2372 There are two buttons at the bottom of the dialog. Pressing the Skip
2373 button will skip the rest of the current file. Pressing the Abort
2374 button will abort the whole operation, the rest of the files are
2375 skipped.
2377 There are three other dialogs which you can run into during the file
2378 operations.
2380 The error dialog informs about error conditions and has three choices.
2381 Normally you select either the Skip button to skip the file or the Abort
2382 button to abort the operation altogether.  You can also select the Retry
2383 button if you fixed the problem from another terminal.
2385 The replace dialog is shown when you attempt to copy or move a file on
2386 the top of an existing file.  The dialog shows the dates and sizes of
2387 the both files.  Press the Yes button to overwrite the file, the No
2388 button to skip the file, the All button to overwrite all the files, the
2389 None button to never overwrite and the Update button to overwrite if the
2390 source file is newer than the target file.  You can abort the whole
2391 operation by pressing the Abort button.
2393 The recursive delete dialog is shown when you try to delete a directory
2394 which is not empty.  Press the Yes button to delete the directory
2395 recursively, the No button to skip the directory, the All button to
2396 delete all the directories and the None button to skip all the non\-empty
2397 directories.  You can abort the whole operation by pressing the Abort
2398 button.  If you selected the Yes or All button you will be asked for a
2399 confirmation.  Type "yes" only if you are really sure you want to do the
2400 recursive delete.
2402 If you have tagged files and perform an operation on them only the files
2403 on which the operation succeeded are untagged. Failed and skipped files
2404 are left tagged.
2405 .\"NODE "Mask Copy/Rename"
2406 .SH "Mask Copy/Rename"
2407 The copy/move operations let you translate the names of files in an
2408 easy way.  To do it, you have to specify the correct source mask and
2409 usually in the trailing part of the destination specify some wildcards.
2410 All the files matching the source mask are copied/renamed according to
2411 the target mask.  If there are tagged files, only the tagged files
2412 matching the source mask are renamed.
2414 There are other options which you can set:
2416 .B Follow links
2418 determines whether make the symlinks and hardlinks in the source
2419 directory (recursively in subdirectories) new links in the target
2420 directory or whether would you like to copy their content.
2422 .B Dive into subdirs
2424 determines the behavior when the source directory is about to be copied,
2425 but the target directory already exists.  The default action is to copy
2426 the contents of the source directory into the target directory.
2427 Enabling this option causes copying the source directory itself into the
2428 target directory.
2430 For example, you want to copy directory
2431 .I /foo
2432 containing file
2433 .I bar
2435 .IR /bla/foo ,
2436 which is an already existing directory.  Normally (when
2437 .B Dive into subdirs
2438 is not set), mc would copy file
2439 .I /foo/bar
2440 into the file
2441 .IR /bla/foo/bar .
2442 By enabling this option the
2443 .I /bla/foo/foo
2444 directory will be created, and
2445 .I /foo/bar
2446 will be copied into
2447 .IR /bla/foo/foo/bar .
2449 .B Preserve attributes
2451 determines whether to preserve the permissions, timestamps and (if you
2452 are root) the ownership of the original files.  If this option is not
2453 set, the current value of the umask will be respected.
2455 .B Use shell patterns on
2457 When the shell patterns option is on you can use the '*' and '?'
2458 wildcards in the source mask.  They work like they do in the shell.  In
2459 the target mask only the '*' and '\\<digit>' wildcards are allowed.  The
2460 first '*' wildcard in the target mask corresponds to the first wildcard
2461 group in the source mask, the second '*' corresponds to the second group
2462 and so on.  The '\\1' wildcard corresponds to the first wildcard group
2463 in the source mask, the '\\2' wildcard corresponds to the second group
2464 and so on all the way up to '\\9'.  The '\\0' wildcard is the whole
2465 filename of the source file.
2467 Two examples:
2469 If the source mask is "*.tar.gz", the destination is "/bla/*.tgz" and the
2470 file to be copied is "foo.tar.gz", the copy will be "foo.tgz" in "/bla".
2472 Suppose you want to swap basename and extension so that "file.c" would
2473 become "c.file" and so on.  The source mask for this is "*.*" and the
2474 destination is "\\2.\\1".
2476 .B Use shell patterns off
2478 When the shell patterns option is off the MC doesn't do automatic
2479 grouping anymore. You must use '\\(...\\)' expressions in the source
2480 mask to specify meaning for the wildcards in the target mask. This is
2481 more flexible but also requires more typing. Otherwise target masks
2482 are similar to the situation when the shell patterns option is on.
2484 Two examples:
2486 If the source mask is "^\\(.*\\)\\.tar\\.gz$", the destination is
2487 "/bla/*.tgz" and the file to be copied is "foo.tar.gz", the copy
2488 will be "/bla/foo.tgz".
2490 Let's suppose you want to swap basename and extension so that "file.c"
2491 will become "c.file" and so on. The source mask for this is
2492 "^\\(.*\\)\\.\\(.*\\)$" and the destination is "\\2.\\1".
2494 .B Case Conversions
2496 You can also change the case of the filenames.  If you use '\\u'
2497 or '\\l' in the target mask, the next character will be converted to
2498 uppercase or lowercase correspondingly.
2500 If you use '\\U' or '\\L' in the target mask, the next characters will
2501 be converted to uppercase or lowercase correspondingly up to the
2502 next '\\E' or next '\\U', '\\L' or the end of the file name.
2504 The '\\u' and '\\l' are stronger than '\\U' and '\\L'.
2506 For example, if the source mask is '*' (shell patterns on) or '^\\(.*\\)$'
2507 (shell patterns off) and the target mask is '\\L\\u*' the file names
2508 will be converted to have initial upper case and otherwise lower case.
2510 You can also use '\\' as a quote character. For example, '\\\\' is
2511 a backslash and '\\*' is an asterisk.
2513 .B Stable symlinks
2515 commands Midnight Commander, that it should change symlinks in the target,
2516 so that they'll point to the same location as it did before. With absolute
2517 symbolic links this does nothing, but if you have a relative one, it will
2518 recompute its value, adding necessary ../ and other directory parts and making
2519 the value as short as possible (most modern filesystems keep short symlinks
2520 inside inodes and thus don't waste much disk space).
2522 .\"NODE "Select/Unselect Files"
2523 .SH "Select/Unselect Files"
2524 The dialog of group of files and directories selection or uselection.
2526 .\"LINK2"
2527 input line
2528 .\"Input Line Keys"
2529 allow enter the regular expression of filenames that will be
2530 selected/unselected.
2532 When
2533 .I Files only
2534 checkbox is on, only files will be selected.  If
2535 .I Files only
2536 is off, as files as directories will be selected.
2537 When
2538 .I Shell Patterns
2539 checkbox is on, the regular expression is much like the filename globbing
2540 in the shell (* standing for zero or more characters and ?  standing
2541 for one character). If
2542 .I Shell Patterns
2543 is off, then the tagging of files is done with normal regular
2544 expressions (see ed (1)). When
2545 .I Case sensitive
2546 checkbox is on, the selection will be case sensitive characters.
2548 .I Case sensitive
2549 is off, the case will be ignored.
2550 .\"NODE "Internal File Viewer"
2551 .SH "Internal File Viewer"
2552 The internal file viewer provides two display modes: ASCII and hex.
2553 To toggle between modes, use the F4 key.
2555 The viewer will try to use the best method provided by your system or
2556 the file type to display the information.
2557 Some character sequences, which appear most often in preformatted manual
2558 pages, are displayed bold and underlined, thus making a pretty display
2559 of your files.
2561 When in hex mode, the search function accepts text in quotes and
2562 constant numbers.  Text in quotes is matched exactly after removing
2563 the quotes.  Each number matches one byte.  You can mix quoted text
2564 with constants like this:
2567 "String" \-1 0xBB 012 "more text"
2570 Note that 012 is an octal number.  \-1 is converted to 0xFF.
2572 Here is a listing of the actions associated with each key that the
2573 Midnight Commander handles in the internal file viewer.
2575 .B F1
2576 Invoke the built\-in hypertext help viewer.
2578 .B F2
2579 Toggle the wrap mode.
2581 .B F4
2582 Toggle the hex mode.
2584 .B F5
2585 Goto line.  This will prompt you for a line number and will display
2586 that line.
2588 .B F6, /.
2589 Regular expression search.
2591 .B ?,
2592 Reverse regular expression search.
2594 .B F7
2595 Normal search / hex mode search.
2597 .B C\-s, F17, n.
2598 Start normal search if there was no previous search expression else
2599 find next match.
2601 .B C\-r.
2602 Start reverse search if there was no previous search expression else
2603 find next match.
2605 .B F8
2606 Toggle Raw/Parsed mode: This will show the file as found on disk or if
2607 a processing filter has been specified in the mc.ext file, then the
2608 output from the filter. Current mode is always the other than written
2609 on the button label, since on the button is the mode which you enter
2610 by that key.
2612 .B F9
2613 Toggle the format/unformat mode: when format mode is on the viewer
2614 will interpret some string sequences to show bold and underline with
2615 different colors. Also, on button label is the other mode than current.
2617 .B F10, Esc.
2618 Exit the internal file viewer.
2620 .B next\-page, space, C\-v.
2621 Scroll one page forward.
2623 .B prev\-page, Alt\-v, C\-b, backspace.
2624 Scroll one page backward.
2626 .B down\-key
2627 Scroll one line forward.
2629 .B up\-key
2630 Scroll one line backward.
2632 .B C\-l
2633 Refresh the screen.
2635 .B C\-o
2636 Switch to the subshell and show the command screen.
2638 .B !
2639 Like C\-o, but run a new shell if the subshell is not running.
2641 .B "[n] m"
2642 Set the mark n.
2644 .B "[n] r"
2645 Jump to the mark n.
2647 .B C\-f
2648 Jump to the next file.
2650 .B C\-b
2651 Jump to the previous file.
2653 .B Alt\-r
2654 Toggle the ruler.
2656 .B Alt\-e
2657 to change charset of displayed text may use M\-e (Alt\-e).
2658 Recoding is made from selected codepage into system codepage. To
2659 cancel the recoding you may select "<No translation>" in charset
2660 selection dialog.
2662 It's possible to instruct the file viewer how to display a file, look
2663 at the
2664 .\"LINK2"
2665 Extension File Edit section
2666 .\"Extension File Edit"
2668 .\"NODE "Internal File Editor"
2669 .SH "Internal File Editor"
2670 The internal file editor is a full\-featured full screen editor.  It can
2671 edit files up to 64 megabytes.  It is possible to edit binary files.
2672 The internal file editor is invoked using
2673 .B F4
2674 if the
2675 .I use_internal_edit
2676 option is set in the initialization file.
2678 The features it presently supports are: block copy, move, delete, cut,
2679 paste; key for key undo; pull\-down menus; file insertion; macro
2680 commands; regular expression search and replace; shift\-arrow text highlighting
2681 (if supported by the terminal); insert\-overwrite toggle; word wrap;
2682 autoindent; tunable tab size; syntax highlighting for various file
2683 types; and an option to pipe text blocks through shell commands like
2684 indent and ispell.
2686 Sections:
2689 .\"LINK2"
2690 Options of editor in ini-file
2691 .\"Internal File Editor / options"
2694 The editor is very easy to use and requires no tutoring. To see what
2695 keys do what, just consult the appropriate pull\-down menu. Other keys
2696 are: Shift movement keys do text highlighting.
2697 .B Ctrl\-Ins
2698 copies to the file
2699 .B cooledit.clip
2701 .B Shift\-Ins
2702 pastes from cooledit.clip.
2703 .B Shift\-Del
2704 cuts to
2705 .BR cooledit.clip ,
2707 .B Ctrl\-Del
2708 deletes highlighted text. Mouse highlighting also works, and you
2709 can override the mouse as usual by holding down the shift key
2710 while dragging the mouse to let normal terminal mouse highlighting
2711 work.
2713 To define a macro, press
2714 .B Ctrl\-R
2715 and then type out the key
2716 strokes you want to be executed. Press
2717 .B Ctrl\-R
2718 again when finished. You can then assign the macro to any key you
2719 like by pressing that key. The macro is executed when you press
2720 .B Ctrl\-A
2721 and then the assigned key. The macro is also executed if
2722 you press Meta, Ctrl, or Esc and the assigned key, provided that the
2723 key is not used for any other function. Once defined, the macro
2724 commands go into the file
2725 .B .mc/cedit/cooledit.macros
2726 in your home directory. You can delete a macro by deleting the
2727 appropriate line in this file.
2730 To change charset of displayed text may use M\-e (Alt\-e).
2731 Recoding is made from selected codepage into system codepage. To
2732 cancel the recoding you may select "<No translation>" in charset
2733 selection dialog.
2736 .B F19
2737 will format the currently highlighted block (plain text or
2738 .B C
2740 .B C++
2741 code or another). This is controlled by the
2742 file
2743 .B @prefix@/share/mc/edit.indent.rc
2744 which is copied to
2745 .B .mc/cedit/edit.indent.rc
2746 in your home directory the first time you use it.
2748 The editor also displays non\-us characters (160+). When editing
2749 binary files, you should set
2750 .B display bits
2751 to 7 bits in the options menu to keep the spacing clean.
2753 .\"NODE "Internal File Editor / options"
2754 .SH "Options of editor in ini-file"
2756 In this section described some options in ini-file.
2757 Options placed in '[Midnight Commander]' section
2760 .I editor_wordcompletion_collect_entire_file
2761 Search autocomplete candidates in entire of file or just from
2762 begin of file to cursor position (0)
2765 .\"NODE "Completion"
2766 .SH "Completion"
2767 Let the Midnight Commander type for you.
2769 Attempt to perform completion on the text before current position.  MC
2770 attempts completion treating the text as variable (if the text begins
2771 with
2772 .BR $ ),
2773 username (if the text begins with
2774 .BR ~ ),
2775 hostname (if the text begins with
2776 .BR @ )
2777 or command (if you are on the command line in the position where you
2778 might type a command, possible completions then include shell reserved
2779 words and shell built\-in commands as well) in turn.  If none of these
2780 matches, filename completion is attempted.
2782 Filename, username, variable and hostname completion works on all input
2783 lines, command completion is command line specific.  If the completion
2784 is ambiguous (there are more different possibilities), MC beeps and the
2785 following action depends on the setting of the
2786 .I Complete: show all
2787 option in the
2788 .\"LINK2"
2789 Configuration
2790 .\"Configuration"
2791 dialog.  If it is enabled, a list of all possibilities pops up next to
2792 the current position and you can select with the arrow keys and
2793 .B Enter
2794 the correct entry.  You can also type the first letters in which the
2795 possibilities differ to move to a subset of all possibilities and
2796 complete as much as possible.  If you press
2797 .B Alt\-Tab
2798 again, only the subset will be shown in the listbox, otherwise the first
2799 item which matches all the previous characters will be highlighted.  As
2800 soon as there is no ambiguity, dialog disappears, but you can hide it by
2801 canceling keys
2802 .BR Esc ,
2803 .B F10
2804 and left and right arrow keys. If
2805 .\"LINK2"
2806 Complete: show all
2807 .\"Configuration"
2808 is disabled, the dialog pops up only if you press
2809 .B Alt\-Tab
2810 for the second time, for the first time MC just beeps.
2811 .\"NODE "Virtual File System"
2812 .SH "Virtual File System"
2813 The Midnight Commander is provided with a code layer to access the file
2814 system; this code layer is known as the virtual file system switch.  The
2815 virtual file system switch allows the Midnight Commander to manipulate
2816 files not located on the Unix file system.
2818 Currently the Midnight Commander is packaged with some Virtual File
2819 Systems (VFS): the
2820 .I local
2821 file system, used for accessing the regular Unix file system; the
2822 .IR ftpfs ,
2823 used to manipulate files on remote systems with the FTP protocol; the
2824 .IR tarfs ,
2825 used to manipulate tar and compressed tar files; the
2826 .IR undelfs ,
2827 used to recover deleted files on ext2 file systems (the default file
2828 system for Linux systems),
2829 .I fish
2830 (for manipulating files over shell connections such as rsh and ssh) and
2831 finally the
2832 .I mcfs
2833 (Midnight Commander file system), a network based file system.  If the
2834 code was compiled with
2835 .I smbfs
2836 support, you can manipulate files on remote systems with the SMB (CIFS)
2837 protocol.
2839 A generic
2840 .I extfs
2841 (EXTernal virtual File System) is provided in order to easily expand
2842 VFS capabilities using scripts and external software.
2844 The VFS switch code will interpret all of the path names used and will
2845 forward them to the correct file system, the formats used for each one
2846 of the file systems is described later in their own section.
2847 .\"NODE "  FTP File System"
2848 .SH "  FTP File System"
2849 The FTP File System (ftpfs) allows you to manipulate files on remote
2850 machines.  To actually use it, you can use the
2851 .I FTP link
2852 item in the menu or directly change your current directory using the
2853 .I cd
2854 command to a path name that looks like this:
2856 .I /#ftp:[!][user[:pass]@]machine[:port][remote\-dir]
2859 .IR user ,
2860 .I port
2862 .I remote\-dir
2863 elements are optional.  If you specify the
2864 .I user
2865 element, the Midnight Commander will login to the remote machine as that
2866 user, otherwise it will use anonymous login or the login name from the
2867 .I ~/.netrc
2868 file.  The optional
2869 .I pass
2870 element is the password used for the connection.  Using the password in
2871 the VFS directory name is not recommended, because it can appear on the
2872 screen in clear text and can be saved to the directory history.
2874 To enable using FTP proxy, prepend
2875 .B !
2876 (an exclamation sign) to the hostname.
2878 Examples:
2881     /#ftp:ftp.nuclecu.unam.mx/linux/local
2882     /#ftp:tsx\-11.mit.edu/pub/linux/packages
2883     /#ftp:!behind.firewall.edu/pub
2884     /#ftp:guest@remote\-host.com:40/pub
2885     /#ftp:miguel:xxx@server/pub
2888 Please check the
2889 .\"LINK2"
2890 Virtual File System
2891 .\"Virtual FS"
2892 dialog box for ftpfs options.
2893 .\"NODE "  Tar File System"
2894 .SH "  Tar File System"
2895 The tar file system provides you with read\-only access to your tar
2896 files and compressed tar files by using the chdir command.  To change
2897 your directory to a tar file, you change your current directory to the
2898 tar file by using the following syntax:
2900 .I /filename.tar#utar/[dir\-inside\-tar]
2902 The mc.ext file already provides a shortcut for tar files, this means
2903 that usually you just point to a tar file and press return to enter
2904 into the tar file, see the
2905 .\"LINK2"
2906 Extension File Edit
2907 .\"Extension File Edit"
2908 section for details on how this is done.
2910 Examples:
2913     mc\-3.0.tar.gz#utar/mc\-3.0/vfs
2914     /ftp/GCC/gcc\-2.7.0.tar#utar
2917 The latter specifies the full path of the tar archive.
2918 .\"NODE "  FIle transfer over SHell filesystem"
2919 .SH "  FIle transfer over SHell filesystem"
2920 The fish file system is a network based file system that allows you to
2921 manipulate the files in a remote machine as if they were local. To use
2922 this, the other side has to either run fish server, or has to have
2923 bash\-compatible shell.
2925 To connect to a remote machine, you just need to chdir
2926 into a special directory which name is in the following
2927 format:
2929 .I /#sh:[user@]machine[:options]/[remote\-dir]
2932 .I user,
2933 .I options
2935 .I remote\-dir
2936 elements are optional.  If you specify the
2937 .I user
2938 element, the Midnight Commander will try to login on the remote
2939 machine as that user, otherwise it will use your login name.
2941 The available
2942 .I options
2943 are:
2945   'C' \- use compression;
2946   'r' \- use rsh instead of ssh;
2947   port \- specify the port used by remote server.
2949 If the
2950 .I remote\-dir
2951 element is present, your current directory on the remote machine will be
2952 set to this one.
2954 Examples:
2957     /#sh:onlyrsh.mx:r/linux/local
2958     /#sh:joe@want.compression.edu:C/private
2959     /#sh:joe@noncompressed.ssh.edu/private
2960     /#sh:joe@somehost.ssh.edu:2222/private
2962 .\"NODE "  Network File System"
2963 .SH "  Network File System"
2964 The Midnight Commander file system is a network base file system that
2965 allows you to manipulate the files in a remote machine as if they were
2966 local.  To use this, the remote machine must be running the mcserv(8)
2967 server program.
2969 To connect to a remote machine, you just need to chdir into a special
2970 directory which name is in the following format:
2972 .I /#mc:[user@]machine[:port][remote\-dir]
2975 .I user, port
2977 .I remote\-dir
2978 elements are optional.  If you specify the
2979 .I user
2980 element then the Midnight Commander will try to logon on the remote
2981 machine as that user, otherwise it will use your login name.
2984 .I port
2985 element is used when the remote server is running on a special port
2986 (see the mcserv(8) manual page for more information about ports);
2987 finally, if the
2988 .I remote\-dir
2989 element is present, your current directory on the remote machine will
2990 be set to this one.
2992 Examples:
2995     /#mc:ftp.nuclecu.unam.mx/linux/local
2996     /#mc:joe@foo.edu:11321/private
2998 .\"NODE "  Undelete File System"
2999 .SH "  Undelete File System"
3000 On Linux systems, if you asked configure to use the ext2fs undelete
3001 facilities, you will have the undelete file system available.
3002 Recovery of deleted files is only available on ext2 file systems.  The
3003 undelete file system is just an interface to the ext2fs library to
3004 retrieve all of the deleted files names on an ext2fs and provides and
3005 to extract the selected files into a regular partition.
3007 To use this file system, you have to chdir into the special file name
3008 formed by the "/#undel" prefix and the file name where the actual
3009 file system resides.
3011 For example, to recover deleted files on the second partition of the
3012 first SCSI disk on Linux, you would use the following path name:
3015     /#undel:sda2
3018 It may take a while for the undelfs to load the required information
3019 before you start browsing files there.
3020 .\"NODE "  SMB File System"
3021 .SH "  SMB File System"
3022 The smbfs allows you to manipulate files on remote machines with SMB
3023 (or CIFS) protocol.  These include Windows for Workgroups,
3024 Windows 9x/ME/XP, Windows NT, Windows 2000 and Samba.
3025 To actually use it, you may try to use the panel command "SMB link..."
3026 (accessible from the menubar) or you may directly change your current
3027 directory to it using the cd command to a path name that looks like this:
3029 .I /#smb:[user@]machine[/service][/remote\-dir]
3032 .IR user ,
3033 .I service
3035 .I remote\-dir
3036 elements are optional.
3038 .IR user ,
3039 .I domain
3041 .I password
3042 can be specified in an input dialog.
3044 Examples:
3047     /#smb:machine/Share
3048     /#smb:other_machine
3049     /#smb:guest@machine/Public/Irlex
3051 .\"NODE "  EXTernal File System"
3052 .SH "  EXTernal File System"
3053 .B extfs
3054 allows to integrate numerous features and file types into GNU Midnight
3055 Commander in an easy way, by writing scripts.
3057 Extfs filesystems can be divided into two categories:
3059 1. Stand\-alone filesystems, which are not associated with any existing
3060 file.  They represent certain system\-wide data as a directory tree.
3061 You can invoke them by typing
3062 .RI ' "cd #fsname" '
3063 where fsname is an extfs short name (see below).  Examples of such
3064 filesystems include audio (list audio tracks on the CD) or apt (list of
3065 all Debian packages in the system).
3067 For example, to list CD\-Audio tracks on your CD\-ROM drive, type
3070   cd #audio
3073 2. 'Archive' filesystems (like rpm, patchfs and more), which represent
3074 contents of a file as a directory tree.  It can consist of 'real' files
3075 compressed in an archive (urar, rpm) or virtual files, like messages
3076 in a mailbox (mailfs) or parts of a patch (patchfs).  To access such
3077 filesystems
3078 .RI ' #fsname '
3079 should be appended to the archive name.  Note that the archive itself
3080 can be on another vfs.
3082 For example, to list contents of a zip archive documents.zip type
3085   cd documents.zip#uzip
3088 In many aspects, you could treat extfs like any other directory.  For
3089 instance, you can add it to the hotlist or change to it from directory
3090 history.  An important limitation is that you cannot invoke shell
3091 commands inside extfs, just like any other non\-local VFS.
3093 Common extfs scripts included with Midnight Commander are:
3095 .B a
3096 access 'A:' DOS/Windows diskette
3097 .RI ( "cd #a" ).
3099 .B apt
3100 front end to Debian's APT package management system
3101 .RI ( "cd #apt" ).
3103 .B audio
3104 audio CD ripping and playing
3105 .RI ( "cd #audio"
3107 .IR "cd device#audio" ).
3109 .B bpp
3110 package of Bad Penguin GNU/Linux distribution
3111 .RI ( "cd file.bpp#bpp" ).
3113 .B deb
3114 package of Debian GNU/Linux distribution
3115 .RI ( "cd file.deb#deb" ).
3117 .B dpkg
3118 Debian GNU/Linux installed packages
3119 .RI ( "cd #deb" ).
3121 .B hp48
3122 view and copy files to/from a HP48 calculator
3123 .RI ( "cd #hp48" ).
3125 .B lslR
3126 browsing of lslR listings as found on many FTPs
3127 .RI ( "cd filename#lslR" ).
3129 .B mailfs
3130 mbox\-style mailbox files support
3131 .RI ( "cd mailbox#mailfs" ).
3133 .B patchfs
3134 extfs to handle unified and context diffs
3135 .RI ( "cd filename#patchfs" ).
3137 .B rpm
3138 RPM package
3139 .RI ( "cd filename#rpm" ).
3141 .B rpms
3142 RPM database management
3143 .RI ( "cd #rpms" ).
3145 .B ulha, urar, uzip, uzoo, uar, uha
3146 archivers
3147 .RI ( "cd archive#xxxx"
3148 where xxxx is one of:
3149 .IR ulha ,
3150 .IR urar ,
3151 .IR uzip ,
3152 .IR uzoo ,
3153 .IR uar ,
3154 .IR uha ).
3156 You could bind file type/extension to specified extfs as described in the
3157 .\"LINK2"
3158 Extension File Edit
3159 .\"Extension File Edit"
3160 section.  Here is an example entry for Debian packages:
3163   regex/\.deb$
3164           Open=%cd %p#deb
3166 .\"NODE "Colors"
3167 .SH "Colors"
3168 The Midnight Commander will try to detect if your terminal supports
3169 color using the terminal database and your terminal name.  Sometimes
3170 it gets confused, so you may force color mode or disable color mode
3171 using the \-c and \-b flag respectively.
3173 If the program is compiled with the Slang screen manager instead of
3174 ncurses, it will also check the variable
3175 .B COLORTERM,
3176 if it is set, it has the same effect as the \-c flag.
3178 You may specify terminals that always force color mode
3179 by adding the
3180 .I color_terminals
3181 variable to the Colors section of the initialization file.  This will
3182 prevent the Midnight Commander from trying to detect if your terminal
3183 supports color.  Example:
3186 [Colors]
3187 color_terminals=linux,xterm
3188 color_terminals=terminal\-name1,terminal\-name2...
3191 The program can be compiled with both ncurses and slang, ncurses does
3192 not provide a way to force color mode: ncurses uses just the
3193 information in the terminal database.
3195 The Midnight Commander provides a way to change the default colors.
3196 Currently the colors are configured using the environment variable
3197 .B MC_COLOR_TABLE
3198 or the Colors section in the initialization file.
3200 In the Colors section, the default color map is loaded from the
3201 .I base_color
3202 variable.  You can specify an alternate color map for a terminal by
3203 using the terminal name as the key in this section.  Example:
3206 [Colors]
3207 base_color=
3208 xterm=menu=magenta:marked=,magenta:markselect=,red
3211 The format for the color definition is:
3214   <keyword>=<foregroundcolor>,<backgroundcolor>:<keyword>= ...
3217 The colors are optional, and the keywords are: normal, selected, marked,
3218 markselect, errors, input, reverse, gauge.  Menu colors are: menu,
3219 menusel, menuhot, menuhotsel.  Dialog colors are: dnormal, dfocus,
3220 dhotnormal, dhotfocus.  Help colors are: helpnormal, helpitalic,
3221 helpbold, helplink, helpslink.  Viewer color is: viewunderline. Editor
3222 colors are: editnormal, editbold, editmarked.
3224 .I input
3225 determines the color of input lines used in query dialogs.
3227 .I gauge
3228 determines the color of the filled part of the progress bar (gauge),
3229 which is used to show the user the progress of file operations, such as
3230 copying.
3232 The dialog boxes use the following colors:
3233 .I dnormal
3234 is used for the normal text,
3235 .I dfocus
3236 is the color used for the currently selected component,
3237 .I dhotnormal
3238 is the color used to differentiate the hotkey color in normal
3239 components, whereas the
3240 .I dhotfocus
3241 color is used for the highlighted color in the currently selected
3242 component.
3244 Menus use the same scheme but uses the menu, menusel, menuhot and
3245 menuhotsel tags instead.
3247 Help uses the following colors:
3248 .I helpnormal
3249 is used for normal text,
3250 .I helpitalic
3251 is used for text which is emphasized in italic in the manual page,
3252 .I helpbold
3253 is used for text which is emphasized in bold in the manual page,
3254 .I helplink
3255 is used for not selected hyperlinks and
3256 .I helpslink
3257 is used for selected hyperlink.
3259 The possible colors are: black, gray, red, brightred, green,
3260 brightgreen, brown, yellow, blue, brightblue, magenta, brightmagenta,
3261 cyan, brightcyan, lightgray and white. And there is a special keyword
3262 for transparent background. It is 'default'. The 'default' can only be
3263 used for background color. Example:
3266 [Colors]
3267 base_color=normal=white,default:marked=magenta,default
3270 .\"NODE "Skins"
3271 .SH "Skins"
3272 You can change the appearance of Midhight Commander.
3273 To do this, you must specify a file that contain descriptions of colors
3274 and lines to draw boxes. Redefining of the colors is entirely compatible
3275 with the assignment of colors, as described in Section
3276 .\"LINK2"
3277 Colors\&.
3278 .\"Colors"
3280 A skin\-file is searched on the following algorithm (to the first one found):
3283 1) command line option
3284 .B \-S \<skin\>
3286 .B \-\-skin=\<skin\>
3288 2) Environment variable
3289 .B MC_SKIN
3291 3) In config file parameter
3292 .B skin
3293 in section
3294 .B [Midnight Commander]
3296 4) File
3297 .B @sysconfdir@/mc/skins/default.ini
3299 5) File
3300 .B @prefix@/share/mc/skins/default.ini
3303 Command line option, environment variable and parameter in config file may
3304 contain the absolute path to the skin\-file (with the extension \.ini
3305 or without it). Search of skin\-file will occur in (to the first one found):
3308 .B ~/.mc/skins/
3311 .B @sysconfdir@/mc/skins/
3314 .B @prefix@/share/mc/skins/
3318 For getting extended info, refer to:
3320 .\"LINK2"
3321 Description of section and parameters
3322 .\"Skins sections"
3324 .\"LINK2"
3325 Color pair definitions
3326 .\"Skins colors"
3328 .\"LINK2"
3329 Draw lines
3330 .\"Skins lines"
3332 .\"LINK2"
3333 Compatibility
3334 .\"Skins oldcolors"
3337 .\"NODE "  Skins sections"
3338 .SH "  Description of section and parameters"
3340 Section
3341 .B [skin]
3342 contain metainfo for skin\-file. Parameter
3343 .I description
3344 contain short text about skin.
3347 Section
3348 .B [filehighlight]
3349 contain descriptions of color pairs for filenames highlighting.
3350 Name of parameters must be equal to names of sections into
3351 filehighlight.ini file.
3353 .\"LINK2"
3354 Filenames Highlight
3355 .\"Filenames Highlight"
3356 for getting more info.
3359 Section
3360 .B [core]
3361 describes the elements that are used everywhere.
3363 .I _default_
3364 Default color pair. Used in all other sections if they not contain
3365 color definitions
3367 .I selected
3368 cursor
3370 .I marked
3371 selected data
3373 .I markselect
3374 cursor on selected data
3376 .I gauge
3377 color of the filled part of the progress bar
3379 .I input
3380 color of input lines used in query dialogs.
3382 .I reverse
3383 reverse color
3386 Section
3387 .B [dialog]
3388 describes the elements that are placed on dialog windows (except error dialogs).
3390 .I _default_
3391 Default color for this section. Used [core]._default_ if not specified
3393 .I dfocus
3394 Color of active element (in focus)
3396 .I dhotnormal
3397 Color of hotkeys
3399 .I dhotfocus
3400 Color of hotkeys in focused element
3403 Section
3404 .B [error]
3405 describes the elements that are placed on error dialog windows
3407 .I _default_
3408 Default color for this section. Used [core]._default_ if not specified
3410 .I errdhotnormal
3411 Color of hotkeys
3413 .I errdhotfocus
3414 Color of hotkeys in focused element
3417 Section
3418 .B [menu]
3419 describes the elements that are placed on menu. This section describes
3420 system menu (called by F9) and user-defined menus (called by F2 in panels
3421 and by F11 in editor).
3423 .I _default_
3424 Default color for this section. Used [core]._default_ if not specified
3426 .I entry
3427 Color of menu items
3429 .I menuhot
3430 Color of menu hotkeys
3432 .I menusel
3433 Color of active menu item (in focus)
3435 .I menuhotsel
3436 Color of menu hotkeys in focused menu item
3439 Section
3440 .B [help]
3441 describes the elements that are placed on help window.
3443 .I _default_
3444 Default color for this section. Used [core]._default_ if not specified
3446 .I helpitalic
3447 Color pair for element with
3448 .B italic
3449 attribute
3451 .I helpbold
3452 Color pair for element with
3453 .B bold
3454 attribute
3456 .I helplink
3457 Color of links
3459 .I helpslink
3460 Color of active link (on focus)
3463 Section
3464 .B [editor]
3465 describes the colors of elements placed in editor.
3467 .I _default_
3468 Default color for this section. Used [core]._default_ if not specified
3470 .I editbold
3471 Color pair for element with
3472 .B bold
3473 attribute
3475 .I editmarked
3476 Color of selected text
3478 .I editwhitespace
3479 Color of tabs and trailing spaces highlighting
3481 .I linestate
3482 Color for line state area
3485 Section
3486 .B [viewer]
3487 describes the colors of elements placed in viewer.
3489 .I viewunderline
3490 Color pair for element with
3491 .B underline
3492 attribute
3494 .\"NODE "  Skins colors"
3495 .SH "  Color pair definitions"
3496 Any parameter in skin\-file contain definition of color pair.
3498 Color pairs described as two colors separated by ';'. First color
3499 sets the foreground color, second color sets background color.
3500 One of the colors may be omitted, in this case color will be
3501 taken from default color pair (global color pair  or
3502 from default color pair of this section).
3504 Example:
3507 [core]
3508     # green on black
3509     _default_=green;black
3510     # green (default)  on blue
3511     selected=;blue
3512     # yellow on black (default)
3513     marked=yellow;
3517 Possible colors (names) described in
3518 .\"LINK2"
3519 Colors\&.
3520 .\"Colors"
3521 section.
3523 .\"NODE "  Skins lines"
3524 .SH "  Draw lines"
3525 Lines sets in section
3526 .B [Lines]
3527 into skin\-file. By default single lines are used, but you may redefine
3528 to usage of any utf\-8 symbols (like to lines, for example).
3530 .I WARNING!!!
3531 When you build Midnight Commander with the Ncurses screen library
3532 usage of drawing lines is limited!
3533 Possible only drawing a single lines.
3534 For all questions and comments please contact the developers of Ncurses.
3537 Descriptions of parameters
3538 .BR [Lines] :
3540 .I lefttop
3541 left-top line fragment.
3543 .I righttop
3544 right-top line fragment.
3546 .I centertop
3547 down branch of horizontal line
3549 .I centerbottom
3550 up branch of horizontal line
3552 .I leftbottom
3553 left-bottom line fragment
3555 .I rightbottom
3556 right-bottom line fragment
3558 .I leftmiddle
3559 right branch of vertical line
3561 .I rightmiddle
3562 left branch of vertical line
3564 .I centermiddle
3565 cross of lines
3567 .I horiz
3568 horizontal line
3570 .I vert
3571 vertical line
3573 .I thinhoriz
3574 thin horizontal line
3576 .I thinvert
3577 thin vertical line
3580 .\"NODE "  Skins oldcolors"
3581 .SH "  Compatibility"
3583 Appointment of color  by skin\-files fully compatible with
3584 the appointment of the colors described in
3585 .\"LINK2"
3586 Colors\&.
3587 .\"Colors"
3588 section.
3590 In this case, reassignment of colors has priority over the skin file and is
3591 complementary.
3593 .\"NODE "Filenames Highlight"
3594 .SH "Filenames Highlight"
3595 Section [filehighlight] in current skin\-file contains key names as
3596 highlight groups and values as color pairs. Color pairs is documented
3598 .\"LINK2"
3599 Skins
3600 .\"Skins"
3601 section.
3603 Rules of filenames highlight are placed in @prefix@/share/mc/filehighlight.ini file
3604 (~/.mc/filehighlight.ini).
3605 Name of section in this file must be equal to parameters names in
3606 [filehighlight] section (in current skin\-file).
3608 Keys in these groups are:
3610 .I type
3611 file type. If present, all other options are ignored.
3613 .I regexp
3614 regular expression. If present, 'extensions' option is ignored.
3616 .I extensions
3617 list of extensions of files. Separated by ';' sign.
3619 .I extensions_case
3620 (make sense only with 'extensions' parameter) make 'extensions'
3621 rule case sentitive (true) or not (false).
3623 `type' key may have values:
3625 \- FILE (all files)
3626   \- FILE_EXE
3627 \- DIR (all directories)
3628   \- LINK_DIR
3629 \- LINK (all links except stale link)
3630   \- HARDLINK
3631   \- SYMLINK
3632 \- STALE_LINK
3633 \- DEVICE (all device files)
3634   \- DEVICE_BLOCK
3635   \- DEVICE_CHAR
3636 \- SPECIAL (all special files)
3637   \- SPECIAL_SOCKET
3638   \- SPECIAL_FIFO
3639   \- SPECIAL_DOOR
3643 .\"NODE "Special Settings"
3644 .SH "Special Settings"
3645 Most of the Midnight Commander settings can be changed from the
3646 menus. However, there are a small number of settings which can only be
3647 changed by editing the setup file.
3649 These variables may be set in your ~/.mc/ini file:
3651 .I clear_before_exec
3652 By default the Midnight Commander clears the screen before executing a
3653 command.  If you would prefer to see the output of the command at the
3654 bottom of the screen, edit your ~/.mc/ini file and change the value of
3655 the field clear_before_exec to 0.
3657 .I confirm_view_dir
3658 If you press F3 on a directory, normally MC enters that directory.  If
3659 this flag is set to 1, then MC will ask for confirmation before changing
3660 the directory if you have files tagged.
3662 .I ftpfs_retry_seconds
3663 This value is the number of seconds the Midnight Commander will wait
3664 before attempting to reconnect to an FTP server that has denied the
3665 login.  If the value is zero, the login will no be retried.
3667 .I max_dirt_limit
3668 Specifies how many screen updates can be skipped at most in the internal
3669 file viewer.  Normally this value is not significant, because the code
3670 automatically adjusts the number of updates to skip according to the
3671 rate of incoming keystrokes.  However, on very slow machines or
3672 terminals with a fast keyboard auto repeat, a big value can make screen
3673 updates too jumpy.
3675 It seems that setting max_dirt_limit to 10 causes the best behavior,
3676 and that is the default value.
3678 .I mouse_move_pages
3679 Controls whenever scrolling with the mouse is done by pages or line by
3680 line on the panels.
3682 .I mouse_move_pages_viewer
3683 Controls if scrolling with the mouse is done by pages or line by line
3684 on the internal file viewer.
3686 .I old_esc_mode
3687 By default the Midnight Commander treats the ESC key as a key prefix
3688 (old_esc_mode=0).  If this option is set (old_esc_mode=1), the ESC key
3689 will act as a prefix key for one second, and if no extra keys have
3690 arrived, then the ESC key is interpreted as a cancel key (ESC ESC).
3692 .I only_leading_plus_minus
3693 Allow special treatment for '+', '\-', '*' in the command line (select,
3694 unselect, reverse selection) only if the command line is empty.  You
3695 don't need to quote those characters in the middle of the command line.
3696 On the other hand, you cannot use them to change selection when the
3697 command line is not empty.
3699 .I reverse_files_only
3700 Allow revert selection of files only. This variable is on by default.
3701 If on, the reverse selection is applied to files only, not to directories.
3702 The selection of directories is untouched. If off, the reverse
3703 selection is applied to files as well to directories: all unselected
3704 items become selected, and vice versa.
3706 .I panel_scroll_pages
3707 If set (the default), panel will scroll by half the display when the
3708 cursor reaches the end or the beginning of the panel, otherwise it
3709 will just scroll a file at a time.
3711 .I show_output_starts_shell
3712 This variable only works if you are not using the subshell support.
3713 When you use the C\-o keystroke to go back to the user screen, if this
3714 one is set, you will get a fresh shell.  Otherwise, pressing any key
3715 will bring you back to the Midnight Commander.
3717 .I timeformat_recent
3718 Change the time format used to display dates less than 6 months from
3719 now.
3720 See strftime or date man page for the format specification. If this
3721 option is absent, default timeformat is used.
3723 .I timeformat_old
3724 Change the time format used to display  dates older than 6 months from
3725 now or for dates in the future.
3726 See strftime or date man page for the format specification. If this
3727 option is absent, default timeformat is used.
3729 .I torben_fj_mode
3730 If this flag is set, then the home and end keys will work slightly
3731 different on the panels, instead of moving the selection to the first
3732 and last files in the panels, they will act as follows:
3734 The home key will: Go up to the middle line, if below it; else go to the
3735 top line unless it is already on the top line, in this case it will go
3736 to the first file in the panel.
3738 The end key has a similar behavior: Go down to the middle line, if over
3739 it; else go to the bottom line unless you already are at the bottom
3740 line, in such case it will move the selection to the last file name in
3741 the panel.
3743 .I use_file_to_guess_type
3744 If this variable is on (the default) it will spawn the file command to
3745 match the file types listed on the
3746 .\"LINK2"
3747 mc.ext file\&.
3748 .\"Extension File Edit"
3750 .I xterm_mode
3751 If this variable is on (default is off) when you browse the file system
3752 on a Tree panel, it will automatically reload the other panel with the
3753 contents of the selected directory.
3755 .I fish_directory_timeout
3756 This variable holds the lifetime of a directory cache entry in seconds. The
3757 default value is 900 seconds.
3759 .I autodetect_codeset
3760 This option allows use the `enca' command to autodetect codeset of text files
3761 in internal viewer and editor. List of valid values can be obtain by the
3762 `enca \-\-list languages | cut \-d : \-f1' command. Option must be located
3763 in the [Misc] section.
3765 For example:
3768 autodetect_codeset=russian
3770 .\"NODE "Terminal databases"
3771 .SH "Terminal databases"
3772 The Midnight Commander provides a way to fix your system terminal
3773 database without requiring root privileges.  The Midnight Commander
3774 searches in the system initialization file (the mc.lib file located in
3775 the Midnight Commander library directory) and in the ~/.mc/ini file for
3776 the section "terminal:your\-terminal\-name" and then for the section
3777 "terminal:general", each line of the section contains a key symbol that
3778 you want to define, followed by an equal sign and the definition for the
3779 key.  You can use the special \\e form to represent the escape character
3780 and the ^x to represent the control\-x character.
3782 The possible key symbols are:
3785 f0 to f20     Function keys f0\-f20
3786 bs            backspace
3787 home          home key
3788 end           end key
3789 up            up arrow key
3790 down          down arrow key
3791 left          left arrow key
3792 right         right arrow key
3793 pgdn          page down key
3794 pgup          page up key
3795 insert        the insert character
3796 delete        the delete character
3797 complete      to do completion
3800 For example, to define the key insert to be the Escape + [ + O + p, you
3801 set this in the ini file:
3804 insert=\\e[Op
3808 Also now you can use
3809 .I extended learn keys.
3810 For example:
3813     ctrl-alt-right=\\e[[1;6C
3814     ctrl-alt-left=\\e[[1;6D
3818 This means that ctrl+alt+left sends a \\e[[1;6D escape sequence
3819 and therefore Midnight Commander interprets "\\e[[1;6D" as Ctrl\-Alt\-Left.
3823 .I complete
3824 key symbol represents the escape sequences used to invoke the completion
3825 process, this is invoked with Alt\-tab, but you can define other keys to do
3826 the same work (on those keyboard with tons of nice and unused keys
3827 everywhere).
3828 .SH ""
3829 .\"NODE "FILES"
3830 .SH "FILES"
3831 Full paths below may vary between installations.  They are also affected
3832 by the MC_DATADIR environment variable.  If it's set, its value is used
3833 instead of @prefix@/share/mc in the paths below.
3835 .I @prefix@/share/mc/mc.hlp
3837 The help file for the program.
3839 .I @prefix@/share/mc/mc.ext
3841 The default system\-wide extensions file.
3843 .I ~/.mc/bindings
3845 User's own extension, view configuration and edit configuration
3846 file.  They override the contents of the system wide files if present.
3848 .I @prefix@/share/mc/mc.ini
3850 The default system\-wide setup for the Midnight Commander, used only if
3851 the user doesn't have his own ~/.mc/ini file.
3853 .I @prefix@/share/mc/mc.lib
3855 Global settings for the Midnight Commander.  Settings in this file
3856 affect all users, whether they have ~/.mc/ini or not.  Currently, only
3857 .\"LINK2"
3858 terminal settings
3859 .\"Terminal databases"
3860 are loaded from mc.lib.
3862 .I ~/.mc/ini
3864 User's own setup. If this file is present then the setup is loaded
3865 from here instead of the system\-wide startup file.
3867 .I @prefix@/share/mc/mc.hint
3869 This file contains the hints displayed by the program.
3871 .I @prefix@/share/mc/mc.menu
3873 This file contains the default system\-wide applications menu.
3875 .I ~/.mc/menu
3877 User's own application menu. If this file is present it is used instead
3878 of the system\-wide applications menu.
3880 .I ~/.mc/Tree
3882 The directory list for the directory tree and tree view features.
3884 .I ./.mc.menu
3886 Local user\-defined menu. If this file is present, it is used instead of
3887 the home or system\-wide applications menu.
3888 .\"SKIP_SECTION"
3889 .SH "LICENSE"
3890 This program is distributed under the terms of the GNU General Public
3891 License as published by the Free Software Foundation. See the built\-in
3892 help for details on the License and the lack of warranty.
3893 .\"NODE "AVAILABILITY"
3894 .SH "AVAILABILITY"
3895 The latest version of this program can be found at
3896 ftp://ftp.gnu.org/gnu/mc/.
3897 .\"NODE "SEE ALSO"
3898 .SH "SEE ALSO"
3899 ed(1), gpm(1), mcserv(8), terminfo(1), view(1), sh(1), bash(1),
3900 tcsh(1), zsh(1).
3903 The Midnight Commander page on the World Wide Web:
3904         http://www.midnight\-commander.org/
3906 .\"NODE "AUTHORS"
3907 .SH "AUTHORS"
3908 Authors and contributors are listed in the AUTHORS file in the source
3909 distribution.
3910 .\"NODE "BUGS"
3911 .SH "BUGS"
3912 See the file TODO in the distribution for information on what remains to
3913 be done.
3915 If you want to report a problem with the program, please send mail to
3916 this address: mc\-devel@gnome.org.
3918 Provide a detailed description of the bug, the version of the program
3919 you are running
3920 .RI ( "mc \-V"
3921 displays this information), the operating system you are running the
3922 program on.  If the program crashes, we would appreciate a stack trace.