2 .TH MC 1 "August 2009" "MC Version 4.7.0\-pre1" "GNU Midnight Commander"
5 mc \- Visual shell for Unix\-like systems.
9 [\-abcCdfhPstuUVx] [\-l log] [dir1 [dir2]] [\-e [file]] [\-v file]
12 GNU Midnight Commander is a directory browser/file manager for
13 Unix\-like operating systems.
18 .I \-a, \-\-stickchars
19 Disable usage of graphic characters for line drawing.
22 Force black and white display.
25 Force color mode, please check the section
31 .I \-C arg, \-\-colors=arg
32 Specify a different color set in the command line. The format of arg is
40 Specify a name of skin in the command line. Technology of skins is
48 Disable mouse support.
50 .I \-e [file], \-\-edit[=file]
51 Start the internal editor. If the file is specified, open it on
56 Display the compiled\-in search paths for Midnight Commander files.
59 Reset softkeys to their default from the termcap/terminfo
60 database. Only useful on HP terminals when the function keys don't work.
63 Specify a name of keymap file in the command line.
65 .I \-l file, \-\-ftplog=file
66 Save the ftpfs dialog with the server in file.
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
78 as an alias to the appropriate shell script.
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:
115 default horizontal line
118 default vertical line
127 Used only if the code was compiled with Slang and terminfo: it makes
128 the Midnight Commander use the value of the
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).
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
142 .I \-v file, \-\-view=file
143 Start the internal viewer to view the specified file. See also
147 Display the version of the program.
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
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
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
182 .\"Left and Right Menus"
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
194 .\"Shell Command Line"
199 sections to learn more about the command line.
200 .\"NODE "Mouse Support"
202 The Midnight Commander comes with mouse support. It is activated
203 whenever you are running on an
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
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
219 .\"Extension File Edit"
220 has a program specified for the file's extension, the specified
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
238 The default auto repeat rate for the mouse buttons is 400
239 milliseconds. This may be changed to other values by editing the
243 file and changing the
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
253 Some commands in the Midnight Commander involve the use of the
255 (sometimes labeled CTRL or CTL) and the
257 (sometimes labeled ALT or even Compose) keys. In this manual we will
258 use the following abbreviations:
261 means hold the Control key while typing the character <chr>.
262 Thus C\-f would be: hold the Control key and type f.
265 means hold the Meta or Alt key down while typing <chr>.
266 If there is no Meta or Alt key, type
268 release it, then type the character <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
278 .I redefine hotkey bindings
281 for more info. All other key bindings (described in this manual) relative
285 There are many sections which tell about the keys. The following are
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
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
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.
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
330 .BR \-\-keymap=\<keymap\>
332 2) Environment variable
335 3) In config file parameter
338 .BR [Midhight Commander]
344 .BR @sysconfdir@/mc/mc.keymap
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):
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:
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
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
380 .\"Extension File Edit"
381 then the corresponding command is executed.
384 repaint all the information in the Midnight Commander.
391 command on a file or on the tagged files.
398 command on the current file or on the tagged files.
401 run the link command.
404 run the symbolic link command.
407 set the other panel display mode to information.
410 set the other panel display mode to quick view.
416 .\"External panelize"
422 add directory to hotlist
427 executes the Filtered view command, described in the
430 .\"Internal File Viewer"
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
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
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
465 Left and Right Menus\&.
466 .\"Left and Right Menus"
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
475 to tag files you may use the Insert key (the kich1 terminfo sequence).
476 To untag files, just retag a tagged file.
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,
490 toggle the current display listing to show the next display listing
492 With this it is possible to quickly switch to brief listing, long
493 listing, user defined listing mode, and back to the default.
495 .B C\-\\\\ (control\-backslash)
500 and change to the selected directory.
503 this is used to select (tag) a group of files. The Midnight Commander
504 will prompt for a selection options. When
506 checkbox is on, only files will be selected. If
508 is off, as files as directories will be selected.
511 checkbox is on, the regular expression is much like the filename globbing
512 in the shell (* standing for zero or more characters and ? standing
513 for one character). If
515 is off, then the tagging of files is done with normal regular
516 expressions (see ed (1)). When
518 checkbox is on, the selection will be case sensitive characters.
521 is off, the case will be ignored.
524 use the "\\" key to unselect a group of files. This is the opposite of
528 move the selection bar to the previous entry in the panel.
531 move the selection bar to the next entry in the panel.
534 move the selection bar to the first entry in the panel.
537 move the selection bar to the last entry in the panel.
540 move the selection bar one page down.
542 .B prev\-page, Alt\-v
543 move the selection bar one page up.
546 If the currently selected file is a directory, load that directory on
547 the other panel and moves the selection to the next file. If the
548 currently selected file is not a directory, load the parent directory
549 on the other panel and moves the selection to the next file.
552 make the current directory of the current panel also the current
553 directory of the other panel. Put the other panel to the listing mode
554 if needed. If the current panel is panelized, the other panel doesn't
557 .B C\-PageUp, C\-PageDown
558 only when supported by the terminal: change to ".." and to the currently
559 selected directory respectively.
562 moves to the previous directory in the history, equivalent to clicking
568 moves to the next directory in the history, equivalent to clicking the
572 .B Alt\-Shift\-h, Alt\-H
573 displays the directory history, equivalent to depressing the 'v' with
575 .\"NODE " Quick search"
577 The Quick search mode allows to perform fast file search in file panel.
582 to start a filename search in the directory listing.
584 When the search is active, the user input will be added to the search string
585 instead of the command line. If the
587 option is enabled the search string is shown on the mini\-status
588 line. When typing, the selection bar will move to the next file
589 starting with the typed letters. The
593 keys can be used to correct typing mistakes. If C\-s is pressed
594 again, the next match is searched for.
596 Besides the filename characters, you can also use wildcard
597 characters '*' and '?'.
598 .\"NODE " Shell Command Line"
599 .SH " Shell Command Line"
600 This section lists keys which are useful to avoid excessive typing when
601 entering shell commands.
604 copy the currently selected file name to the command line.
607 same a Alt\-Enter. May not work on remote systems and some terminals.
610 copy the full path name of the currently selected file to the command
611 line. May not work on remote systems and some terminals.
614 does the filename, command, variable, username and hostname
621 copy the tagged files (or if there are no tagged files, the selected
622 file) of the current panel (C\-x t) or of the other panel (C\-x C\-t) to
626 the first key sequence copies the current path name to the command
627 line, and the second one copies the unselected panel's path name to
631 the quote command can be used to insert characters that are otherwise
632 interpreted by the Midnight Commander (like the '+' symbol)
635 use these keys to browse through the command history. Alt\-p takes you
636 to the last entry, Alt\-n takes you to the next one.
639 displays the history for the current input line.
640 .\"NODE " General Movement Keys"
641 .SH " General Movement Keys"
642 The help viewer, the file viewer and the directory tree use common
643 code to handle moving. Therefore they accept exactly the same
644 keys. Each of them also accepts some keys of its own.
646 Other parts of the Midnight Commander use some of the same movement
647 keys, so this section may be of use for those parts too.
650 moves one line backward.
653 moves one line forward.
655 .B Prev Page, Page Up, Alt\-v
658 .B Next Page, Page Down, C\-v
662 moves to the beginning.
667 The help viewer and the file viewer accept the following keys in
668 addition the to ones mentioned above:
670 .B b, C\-b, C\-h, Backspace, Delete
677 moves one half of a page up or down.
680 moves to the beginning or to the end.
681 .\"NODE " Input Line Keys"
682 .SH " Input Line Keys"
683 The input lines (they are used for the
686 .\"Shell Command Line"
687 and for the query dialogs in the program) accept these keys:
690 puts the cursor at the beginning of line.
693 puts the cursor at the end of the line.
696 move the cursor one position left.
699 move the cursor one position right.
702 moves one word forward.
705 moves one word backward.
708 delete the previous character.
711 delete the character in the point (over the cursor).
714 sets the mark for cutting.
717 copies the text between the cursor and the mark to a kill buffer and
718 removes the text from the input line.
721 copies the text between the cursor and the mark to a kill buffer.
724 yanks back the contents of the kill buffer.
727 kills the text from the cursor to the end of the line.
730 Use these keys to browse through the command history. Alt\-p takes you
731 to the last entry, Alt\-n takes you to the next one.
733 .B Alt\-C\-h, Alt\-Backspace
734 delete one word backward.
737 does the filename, command, variable, username and hostname
745 The menu bar pops up when you press F9 or click the mouse on the top
746 row of the screen. The menu bar has five menus: "Left", "File",
747 "Command", "Options" and "Right".
752 .\"Left and Right Menus"
753 allow you to modify the appearance of the left and right directory
760 lists the actions you can perform on the currently selected file or
767 lists the actions which are more general and bear no relation to the
768 currently selected file or the tagged files.
774 lists the actions which allow you to customize the Midnight Commander.
775 .\"NODE " Left and Right Menus"
776 .SH " Left and Right (Above and Below) Menus"
777 The outlook of the directory panels can be changed from the
781 menus (they are named
785 when the horizontal panel split is chosen from the
790 .\"NODE " Listing Mode..."
791 .SH " Listing Mode..."
792 The listing mode view is used to display a listing of files, there are
793 four different listing modes available:
799 The full directory view shows the file name, the size of the file and
800 the modification time.
802 The brief view shows only the file name and it has two columns
803 (therefore showing twice as many files as other views). The long view
804 is similar to the output of
806 command. The long view takes the whole screen width.
808 If you choose the "User" display format, then you have to specify
811 The user display format must start with a panel size specifier. This
812 may be "half" or "full", and they specify a half screen panel and a
813 full screen panel respectively.
815 After the panel size, you may specify the two columns mode on the
816 panel, this is done by adding the number "2" to the user format
819 After this you add the name of the fields with an optional size
820 specifier. This are the available fields you may display:
823 displays the file name.
826 displays the file size.
829 is an alternative form of the
831 format. It displays the size of the files and for directories it just
832 shows SUB\-DIR or UP\-\-DIR.
835 displays a one character wide type field. This character is similar to
836 what is displayed by ls with the \-F flag \-
838 for executable files,
846 for character devices,
852 for symbolic links to directories and
854 for stale symlinks (links that point nowhere).
857 an asterisk if the file is tagged, a space if it's not.
860 file's last modification time.
863 file's last access time.
866 file's status change time.
869 a string representing the current permission bits of the file.
872 an octal value with the current permission bits of the file.
875 the number of links to the file.
884 the owner of the file.
887 the group of the file.
890 the inode of the file.
892 Also you can use following keywords to define the panel layout:
895 a space in the display format.
898 add a vertical line to the display format.
900 To force one field to a fixed size (a size specifier), you just add
902 followed by the number of characters you want the field to have. If the
903 number is followed by the symbol
905 then the size specifies the minimal field size \- if the program finds
906 out that there is more space on the screen, it will then expand that
911 display corresponds to this format:
913 half type name | size | mtime
917 display corresponds to this format:
919 full perm space nlink space owner space group space size space mtime
922 This is a nice user display format:
924 half name | size:7 | type mode:3
926 Panels may also be set to the following modes:
929 The info view display information related to the currently
930 selected file and if possible information about the current file
934 The tree view is quite similar to the
938 feature. See the section about it for more information.
941 In this mode, the panel will switch to a reduced
944 .\"Internal File Viewer"
945 that displays the contents of the currently selected file, if you
946 select the panel (with the tab key or the mouse), you will have access
947 to the usual viewer commands.
948 .\"NODE " Sort Order..."
950 The eight sort orders are by name, by extension, by modification time,
951 by access time, and by inode information modification time, by size,
952 by inode and unsorted. In the Sort order dialog box you can choose
953 the sort order and you may also specify if you want to sort in reverse
954 order by checking the reverse box.
956 By default directories are sorted before files but this can be changed
962 .BR "Mix all files" ).
965 The filter command allows you to specify a shell pattern (for example
967 which the files must match to be shown. Regardless
968 of the filter pattern, the directories and the links to directories
969 are always shown in the directory panel.
972 The reread command reload the list of files in the directory. It is
973 useful if other processes have created or removed files. If you
974 have panelized file names in a panel this will reload the directory
975 contents and remove the panelized information (See the section
978 .\"External panelize"
979 for more information).
982 The Midnight Commander uses the F1 \- F10 keys as keyboard shortcuts
983 for commands appearing in the file menu. The escape sequences for the
984 function keys are terminfo capabilities kf1 trough kf10. On terminals
985 without function key support, you can achieve the same functionality by
986 pressing the ESC key and then a number in the range 1 through 9 and 0
987 (corresponding to F1 to F9 and F10 respectively).
989 The File menu has the following commands (keyboard shortcuts in parentheses):
993 Invokes the built\-in hypertext help viewer. Inside the
997 you can use the Tab key to select the next link and the Enter key to
998 follow that link. The keys Space and Backspace are used to move
999 forward and backward in a help page. Press F1 again to get the full
1000 list of accepted keys.
1008 The user menu provides an easy way to provide users with a menu and
1009 add extra features to the Midnight Commander.
1011 .B View (F3, Shift\-F3)
1013 View the currently selected file. By default this invokes the
1015 Internal File Viewer
1016 .\"Internal File Viewer"
1017 but if the option "Use internal view" is off, it invokes an external
1018 file viewer specified by the
1020 environment variable. If
1024 environment variable is tried. If
1026 is also undefined, the "view" command is invoked. If you use Shift\-F3
1027 instead, the viewer will be invoked without doing any formatting or
1028 preprocessing to the file.
1030 .B Filtered View (Alt\-!)
1032 This command prompts for a command
1033 and its arguments (the argument defaults to the currently selected
1034 file name), the output from such command is shown in the internal file
1039 Press F4 to edit the highlighted file. Press F14 (usually Shift\-F4)
1040 to start the editor with a new, empty file.
1041 Currently they invoke the
1043 editor, or the editor specified in the
1045 environment variable, or the
1047 Internal File Editor
1048 .\"Internal File Editor"
1049 if the use_internal_edit option is on.
1053 Press F5 to pop up an input dialog to copy the currently selected file (or
1054 the tagged files, if there is at least one file tagged) to the
1055 directory/filename you specify in the input dialog. The destination
1056 defaults to the directory in the non\-selected panel. During this
1057 process, you can press C\-c or ESC to abort the operation. For details
1058 about source mask (which will be usually either * or ^\\(.*\\)$ depending
1059 on setting of Use shell patterns) and possible wildcards in the destination
1063 .\"Mask Copy/Rename"
1065 F15 (usually Shift\-F5) is similar, but defaults to the directory in the
1066 selected panel. It always operates on the selected file, regardless of
1069 On some systems, it is possible to do the copy in the background by
1070 clicking on the background button (or pressing Alt\-b in the dialog
1075 is used to control the background process.
1079 Create a hard link to the current file.
1083 Create a symbolic link to the current file. To those of you who don't
1084 know what links are: creating a link to a file is a bit like copying
1085 the file, but both the source filename and the destination filename
1086 represent the same file image. For example, if you edit one of these
1087 files, all changes you make will appear in both files. Some people call
1088 links aliases or shortcuts.
1090 A hard link appears as a real file. After making it, there is no way of
1091 telling which one is the original and which is the link. If you delete
1092 either one of them the other one is still intact. It is very difficult
1093 to notice that the files represent the same image. Use hard links when
1094 you don't even want to know.
1096 A symbolic link is a reference to the name of the original file. If
1097 the original file is deleted the symbolic link is useless. It is quite
1098 easy to notice that the files represent the same image. The Midnight
1099 Commander shows an "@"\-sign in front of the file name if it is a
1100 symbolic link to somewhere (except to directory, where it shows a tilde (~)).
1101 The original file which the link points to is shown on mini\-status line if the
1102 .I "Show mini\-status"
1103 option is enabled. Use symbolic links when you want to avoid the
1104 confusion that can be caused by hard links.
1106 .B Rename/Move (F6, F16)
1108 Press F6 to pop up an input dialog to copy the currently selected file (or
1109 the tagged files, if there is at least one file tagged) to the
1110 directory/filename you specify in the input dialog. The destination
1111 defaults to the directory in the non\-selected panel. For more details
1112 look at Copy (F5) operation above, most of the things are quite similar.
1114 F16 (usually Shift\-F6) is similar, but defaults to the directory in the
1115 selected panel. It always operates on the selected file, regardless of
1118 On some systems, it is possible to do the copy in the background by
1119 clicking on the background button (or pressing Alt\-b in the dialog
1124 is used to control the background process.
1128 Pop up an input dialog and creates the directory specified.
1132 Delete the currently selected file or the tagged files in the
1133 currently selected panel. During the process, you can press C\-c or
1134 ESC to abort the operation.
1136 .B Quick cd (Alt\-c)
1141 command if you have full command line and want to cd somewhere.
1145 This is used to select (tag) a group of files. The Midnight Commander
1146 will prompt for a selection options. When
1148 checkbox is on, only files will be selected. If
1150 is off, as files as directories will be selected.
1153 checkbox is on, the regular expression is much like the filename globbing
1154 in the shell (* standing for zero or more characters and ? standing
1155 for one character). If
1157 is off, then the tagging of files is done with normal regular
1158 expressions (see ed (1)). When
1160 checkbox is on, the selection will be case sensitive characters.
1163 is off, the case will be ignored.
1165 .B Unselect group (\\\\)
1167 Used to unselect a group of files. This is the opposite of the
1171 .B Quit (F10, Shift\-F10)
1173 Terminate the Midnight Commander. Shift\-F10 is used when you want to
1174 quit and you are using the shell wrapper. Shift\-F10 will not take you
1175 to the last directory you visited with the Midnight Commander, instead
1176 it will stay at the directory where you started the Midnight Commander.
1179 This command is useful if you have a full command line and want to
1182 .\"The cd internal command"
1183 somewhere without having to yank and paste the command line. This command
1184 pops up a small dialog, where you enter everything you would enter after
1186 on the command line and then you press enter. This features all the things
1187 that are already in the
1189 internal cd command\&.
1190 .\"The cd internal command"
1191 .\"NODE " Command Menu"
1197 command shows a tree figure of the directories.
1203 command allows you to search for a specific file.
1205 The "Swap panels" command swaps the contents of the two directory panels.
1207 The "Panels on/off" command shows the output of the last shell command.
1208 This works only on xterm and on Linux and FreeBSD console.
1210 The Compare directories (C\-x d) command compares the directory
1211 panels with each other. You can then use the Copy (F5) command to make
1212 the panels identical. There are three compare methods. The quick method
1213 compares only file size and file date. The thorough method makes a
1214 full byte\-by\-byte compare. The thorough method is not available if the
1215 machine does not support the mmap(2) system call. The size\-only
1216 compare method just compares the file sizes and does not check the
1217 contents or the date times, it just checks the file size.
1219 The Command history command shows a list of typed commands. The
1220 selected command is copied to the command line. The command history
1221 can also be accessed by typing Alt\-p or Alt\-n.
1225 Directory hotlist (C\-\\)
1227 command makes changing of the current directory to often used directories
1233 .\"External panelize"
1234 allows you to execute an external program, and make the output of that
1235 program the contents of the current panel.
1239 .\"Extension File Edit"
1240 command allows you to specify programs to executed when you try to
1241 execute, view, edit and do a bunch of other thing on files
1242 with certain extensions (filename endings). The
1246 command may be used for editing the user menu (which appears by
1248 .\"NODE " Directory Tree"
1249 .SH " Directory Tree"
1250 The Directory Tree command shows a tree figure of the directories. You
1251 can select a directory from the figure and the Midnight Commander will
1252 change to that directory.
1254 There are two ways to invoke the tree. The real directory tree command
1255 is available from Commands menu. The other way is to select tree view
1256 from the Left or Right menu.
1258 To get rid of long delays the Midnight Commander creates the tree
1259 figure by scanning only a small subset of all the directories. If the
1260 directory which you want to see is missing, move to its parent
1261 directory and press C\-r (or F2).
1263 You can use the following keys:
1266 General movement keys
1267 .\"General Movement Keys"
1271 In the directory tree, exits the directory tree and changes to this
1272 directory in the current panel. In the tree view, changes to this
1273 directory in the other panel and stays in tree view mode in the
1276 .B C\-r, F2 (Rescan).
1277 Rescan this directory. Use this when the tree figure is out of date:
1278 it is missing subdirectories or shows some subdirectories which don't
1282 Delete this directory from the tree figure. Use this to remove clutter
1283 from the figure. If you want the directory back to the tree figure
1284 press F2 in its parent directory.
1286 .B F4 (Static/Dynamic).
1287 Toggle between the dynamic navigation mode (default) and the static
1290 In the static navigation mode you can use the Up and Down keys to
1291 select a directory. All known directories are shown.
1293 In the dynamic navigation mode you can use the Up and Down keys to
1294 select a sibling directory, the Left key to move to the parent
1295 directory, and the Right key to move to a child directory. Only the
1296 parent, sibling and children directories are shown, others are left
1297 out. The tree figure changes dynamically as you traverse.
1306 Make a new directory below this directory.
1309 Delete this directory from the file system.
1312 Search the next directory matching the search string. If there is
1313 no such directory these keys will move one line down.
1316 Delete the last character of the search string.
1318 .B Any other character.
1319 Add the character to the search string and move to the next directory
1320 which starts with these characters. In the tree view you must first
1321 activate the search mode by pressing C\-s. The search string is shown
1322 in the mini status line.
1324 The following actions are available only in the directory tree. They
1325 aren't supported in the tree view.
1328 Invoke the help viewer and show this section.
1331 Exit the directory tree. Do not change the directory.
1333 The mouse is supported. A double\-click behaves like Enter. See
1338 .\"NODE " Find File"
1340 The Find File feature first asks for the start directory for the
1341 search and the filename to be searched for. By pressing the Tree
1342 button you can select the start directory from the
1348 The contents field accepts regular expressions similar to egrep(1). That
1349 means you have to escape characters with a special meaning to egrep with "\\",
1350 e.g. if you search for "strcmp (" you will have to input "strcmp \\("
1351 (without the double quotes).
1353 Option \"Whole words\" Allow select only those files containing matches that
1354 form whole words. Like grep \-w
1356 You can start the search by pressing the OK button.
1357 During the search you can stop from the Stop button and continue from
1360 You can browse the filelist with the up and down arrow keys. The Chdir
1361 button will change to the directory of the currently selected
1362 file. The Again button will ask for the parameters for a new
1363 search. The Quit button quits the search operation. The Panelize
1364 button will place the found files to the current directory panel so
1365 that you can do additional operations on them (view, copy, move,
1366 delete and so on). After panelizing you can press C\-r to return to the
1367 normal file listing.
1369 It is possible to have a list of directories that the Find File command
1370 should skip during the search (for example, you may want to avoid
1371 searches on a CD\-ROM or on a NFS directory that is mounted across a slow
1374 Directories to be skipped should be set on the variable
1378 section of your ~/.mc/ini file.
1380 Directory components should be separated with a colon, here is an
1385 ignore_dirs=/cdrom:/nfs/wuarchive:/afs
1388 You may consider using the
1391 .\"External panelize"
1392 command for some operations. Find file command is for simple queries
1393 only, while using External panelize you can do as mysterious searches
1395 .\"NODE " External panelize"
1396 .SH " External panelize"
1397 The External panelize allows you to execute an external program, and
1398 make the output of that program the contents of the current panel.
1400 For example, if you want to manipulate in one of the panels all the
1401 symbolic links in the current directory, you can use external
1402 panelization to run the following command:
1405 find . \-type l \-print
1408 Upon command completion, the directory contents of the panel will no
1409 longer be the directory listing of the current directory, but all the
1410 files that are symbolic links.
1412 If you want to panelize all of the files that have been downloaded
1413 from your FTP server, you can use this awk command to extract the file
1414 name from the transfer log files:
1417 awk '$9 ~! /incoming/ { print $9 }' < /var/log/xferlog
1420 You may want to save often used panelize commands under a descriptive name,
1421 so that you can recall them quickly. You do this by typing the command on
1422 the input line and pressing Add new button. Then you enter a name under
1423 which you want the command to be saved. Next time, you just choose that
1424 command from the list and do not have to type it again.
1427 The Directory hotlist command shows the labels of the directories
1428 in the directory hotlist. The Midnight Commander will change to the
1429 directory corresponding to the selected label. From the hotlist dialog,
1430 you can remove already created label/directory pairs and add new ones.
1431 To add new directories quickly, you can use the Add to hotlist command
1432 (C\-x h), which adds the current directory into the directory hotlist,
1433 asking just for the label for the directory.
1435 This makes cd to often used directories faster. You may consider using the
1436 CDPATH variable as described in
1439 .\"The cd internal command"
1441 .\"NODE " Extension File Edit"
1442 .SH " Extension File Edit"
1443 This will invoke your editor on the file
1444 .IR ~/.mc/bindings .
1445 The format of this file following:
1447 All lines starting with # or empty lines are thrown away.
1449 Lines starting in the first column should have following format:
1452 i.e. everything after the slash until new line is
1461 is an extension (no wildcards). File matches it its name ends
1472 is a regular expression. File matches if its name matches the regular
1478 is a regular expression. File matches if it is a directory and its name
1479 matches the regular expression.
1484 is a regular expression. File matches if the output of
1486 without the initial "filename:" part matches regular expression
1490 \- matches any file.
1495 \- denotes a common section.
1497 is the name of the section.
1499 Other lines should start with a space or tab and should be of the format:
1501 (with no spaces around =), where
1505 (invoked on Enter or double click),
1511 (to add rules from the common section).
1513 is any one\-line shell command, with the simple
1515 macro substitution\&.
1516 .\"Macro Substitution"
1518 Rules are matched from top to bottom, thus the order is important. If
1519 the appropriate action is missing, search continues as if this rule
1520 didn't match (i.e. if a file matches the first and second entry and View
1521 action is missing in the first one, then on pressing F3 the View action
1522 from the second entry will be used).
1524 should match all the actions.
1525 .\"NODE " Background jobs"
1526 .SH " Background Jobs"
1527 This lets you control the state of any background Midnight Commander
1528 process (only copy and move files operations can be done in the
1529 background). You can stop, restart and kill a background job from
1531 .\"NODE " Menu File Edit"
1532 .SH " Menu File Edit"
1533 The user menu is a menu of useful actions that can be customized by
1534 the user. When you access the user menu, the
1535 file .mc.menu from the current directory is used if it exists,
1536 but only if it is owned by user or root and is not world\-writable.
1537 If no such file found, ~/.mc/menu is tried in the same way,
1538 and otherwise mc uses the default system\-wide menu
1539 @prefix@/share/mc/mc.menu.
1541 The format of the menu file is very simple. Lines that start with
1542 anything but space or tab are considered entries for the menu (in
1543 order to be able to use it like a hot key, the first character should
1544 be a letter). All the lines that start with a space or a tab are the
1545 commands that will be executed when the entry is selected.
1547 When an option is selected all the command lines of the option are
1548 copied to a temporary file in the temporary directory (usually
1549 /usr/tmp) and then that file is executed. This allows the user to put
1550 normal shell constructs in the menus. Also simple macro substitution
1551 takes place before executing the menu code. For more information, see
1553 macro substitution\&.
1554 .\"Macro Substitution"
1556 Here is a sample mc.menu file:
1559 A Dump the currently selected file
1562 B Edit a bug report and send it to root
1563 I=`mktemp ${MC_TMPDIR:\-/tmp}/mail.XXXXXX` || exit 1
1565 mail \-s "Midnight Commander bug" root < $I
1574 H Call the info hypertext browser
1577 J Copy current directory to other panel recursively
1578 tar cf \- . | (cd %D && tar xvpf \-)
1580 K Make a release of the current subdirectory
1581 echo \-n "Name of distribution file: "
1583 ln \-s %d `dirname %d`/$tar
1585 tar cvhf ${tar}.tar $tar
1587 = f *.tar.gz | f *.tgz & t n
1588 X Extract the contents of a compressed tar file
1592 .B Default Conditions
1594 Each menu entry may be preceded by a condition. The condition must
1595 start from the first column with a '=' character. If the condition is
1596 true, the menu entry will be the default entry.
1599 Condition syntax: = <sub\-cond>
1600 or: = <sub\-cond> | <sub\-cond> ...
1601 or: = <sub\-cond> & <sub\-cond> ...
1603 Sub\-condition is one of following:
1605 y <pattern> syntax of current file matching pattern?
1606 (for edit menu only)
1607 f <pattern> current file matching pattern?
1608 F <pattern> other file matching pattern?
1609 d <pattern> current directory matching pattern?
1610 D <pattern> other directory matching pattern?
1611 t <type> current file of type?
1612 T <type> other file of type?
1613 x <filename> is it executable filename?
1614 ! <sub\-cond> negate the result of sub\-condition
1617 Pattern is a normal shell pattern or a regular expression, according
1618 to the shell patterns option. You can override the global value of
1619 the shell patterns option by writing "shell_patterns=x" on the first
1620 line of the menu file (where "x" is either 0 or 1).
1622 Type is one or more of the following characters:
1637 For example 'rlf' means either regular file, link or fifo. The 't'
1638 type is a little special because it acts on the panel instead of the
1639 file. The condition '=t t' is true if there are tagged files in the
1640 current panel and false if not.
1642 If the condition starts with '=?' instead of '=' a debug trace will be
1643 shown whenever the value of the condition is calculated.
1645 The conditions are calculated from left to right. This means
1647 = f *.tar.gz | f *.tgz & t n
1651 ( (f *.tar.gz) | (f *.tgz) ) & (t n)
1654 Here is a sample of the use of conditions:
1657 = f *.tar.gz | f *.tgz & t n
1658 L List the contents of a compressed tar\-archive
1659 gzip \-cd %f | tar xvf \-
1662 .B Addition Conditions
1664 If the condition begins with '+' (or '+?') instead of '=' (or '=?') it
1665 is an addition condition. If the condition is true the menu entry will
1666 be included in the menu. If the condition is false the menu entry will
1667 not be included in the menu.
1669 You can combine default and addition conditions by starting condition
1670 with '+=' or '=+' (or '+=?' or '=+?' if you want debug trace). If you
1671 want to use two different conditions, one for adding and another for
1672 defaulting, you can precede a menu entry with two condition lines, one
1673 starting with '+' and another starting with '='.
1675 Comments are started with '#'. The additional comment lines must start
1676 with '#', space or tab.
1677 .\"NODE " Options Menu"
1679 The Midnight Commander has some options that may be toggled on and
1680 off in several dialogs which are accessible from this menu. Options
1681 are enabled if they have an asterisk or "x" in front of them.
1687 command pops up a dialog from which you can change most of settings of
1688 the Midnight Commander.
1694 command pops up a dialog from which you specify a bunch of options how mc
1695 looks like on the screen.
1701 command pops up a dialog from which you specify which actions you want to
1708 command pops up a dialog from which you may select which characters is your
1709 terminal able to display.
1715 command pops up a dialog from which you test some keys which are not working
1716 on some terminals and you may fix them.
1722 command pops up a dialog from which you specify some VFS related options.
1728 command saves the current settings of the Left, Right and Options
1729 menus. A small number of other settings is saved, too.
1730 .\"NODE " Configuration"
1731 .SH " Configuration"
1732 The options in this dialog are divided into three groups:
1733 Panel Options, Pause after run and Other Options.
1737 .I Use SI size units.
1738 If this option is set, Midnight Commander will use SI units (powers of 1000)
1739 when displaying any byte sizes. The suffixes (k, m ...) are shown in lowercase.
1740 If unset (default), Midnight Commander will use binary units (powers of 1024)
1741 and the suffixes are shown in upper case (K, M ...)
1743 .I Show Backup Files.
1744 If enabled, the Midnight Commander will show files ending with a tilde.
1745 Otherwise, they won't be shown (like GNU's ls option \-B).
1747 .I Show Hidden Files.
1748 If enabled, the Midnight Commander will show all files that start with
1749 a dot (like ls \-a).
1752 If enabled, the selection bar will move down when you mark a file (with
1756 When this option is enabled, the pull down menus will be activated as
1757 soon as you press the
1759 key. Otherwise, you will only get the menu title, and you will have
1760 to activate the menu either with the arrow keys or with the hotkeys.
1761 It is recommended if you are using hotkeys.
1764 If this option is enabled, all files and directories are shown mixed
1765 together. If the option is off, directories (and links to directories)
1766 are shown at the beginning of the listing, and other files below.
1768 .I Fast directory reload.
1769 If this option is enabled, the Midnight Commander will use a trick to
1770 determine if the directory contents have changed. The trick is to reload
1771 the directory only if the i\-node of the directory has changed; this means
1772 that reloads only happen when files are created or deleted. If what
1773 changes is the i\-node for a file in the directory (file size changes,
1774 mode or owner changes, etc) the display is not updated. In these cases,
1775 if you have the option on, you have to rescan the directory manually
1780 After executing your commands, the Midnight Commander can pause, so
1781 that you can examine the output of the command. There are three
1782 possible settings for this variable:
1785 Means that you do not want to see the output of your command. If you
1786 are using the Linux or FreeBSD console or an xterm, you will be able to
1787 see the output of the command by typing C\-o.
1789 .I On dumb terminals.
1790 You will get the pause message on terminals that are not capable of
1791 showing the output of the last command executed (any terminal that is
1792 not an xterm or the Linux console).
1795 The program will pause after executing all of your commands.
1799 .I Verbose operation.
1800 This toggles whether the file Copy, Rename and Delete operations are
1801 verbose (i.e., display a dialog box for each operation). If you have a
1802 slow terminal, you may wish to disable the verbose operation. It is
1803 automatically turned off if the speed of your terminal is less than
1807 If this option is enabled, the Midnight
1808 Commander computes total byte sizes and total number of files
1809 prior to any Copy, Rename and Delete operations. This will
1810 provide you with a more accurate progress bar at the expense
1811 of some speed. This option has no effect, if
1812 .I Verbose operation
1816 By default the Select, Unselect and Filter commands will use shell\-like
1817 regular expressions. The following conversions are performed to achieve
1818 this: the '*' is replaced by '.*' (zero or more characters); the '?'
1819 is replaced by '.' (exactly one character) and '.' by the literal
1820 dot. If the option is disabled, then the regular expressions are the
1821 ones described in ed(1).
1824 If this option is enabled, when you exit the Midnight Commander the
1825 configurable options of the Midnight Commander are saved in the
1829 If this option is enabled, the user menu will be invoked at startup.
1830 Useful for building menus for non\-unixers.
1832 .I Use internal editor.
1833 If this option is enabled, the built\-in file editor is used to edit
1834 files. If the option is disabled, the editor specified in the
1836 environment variable is used.
1837 If no editor is specified,
1839 is used. See the section on the
1841 internal file editor\&.
1842 .\"Internal File Editor"
1844 .I Use internal viewer.
1845 If this option is enabled, the built\-in file viewer is used to view
1846 files. If the option is disabled, the pager specified in the
1848 environment variable is used.
1849 If no pager is specified, the
1851 command is used. See the section on the
1853 internal file viewer\&.
1854 .\"Internal File Viewer"
1856 .I Complete: show all.
1857 By default the Midnight Commander pops up all possible
1861 if the completion is ambiguous only when you press
1863 for the second time. For the first time, it just completes as much as
1864 possible and beeps in the case of ambiguity. Enable this option if you
1865 want to see all possible completions even after pressing
1870 If this option is enabled, the
1871 Midnight Commander shows a rotating dash in the upper right corner
1872 as a work in progress indicator.
1874 .I Lynx\-like motion.
1875 If this option is enabled,
1876 you may use the arrows keys to automatically chdir if the
1877 current selection is a subdirectory and the shell command
1878 line is empty. By default, this setting is off.
1880 .I Cd follows links.
1881 This option, if set, causes the Midnight Commander to follow the
1882 logical chain of directories when changing current directory
1883 either in the panels, or using the cd command. This is the default
1884 behavior of bash. When unset, the Midnight Commander follows the
1885 real directory structure, so cd .. if you've entered that directory
1886 through a link will move you to the current directory's real parent
1887 and not to the directory where the link was present.
1890 If this option is enabled, deleting files and directory hotlist entries
1891 unintentionally becomes more difficult. The default selection in the
1892 confirmation dialogs for deletion changes from "Yes" to "No".
1893 This option is disabled by default.
1896 The layout dialog gives you a possibility to change the general layout
1897 of screen. You can specify whether the menubar, the command prompt, the
1898 hintbar and the function keybar are visible. On the Linux or FreeBSD
1899 console you can specify how many lines are shown in the output window.
1901 The rest of the screen area is used for the two directory panels. You
1902 can specify whether the area is split to the panels in vertical or
1903 horizontal direction. The split can be equal or you can specify an
1906 You can specify whether
1910 should be highlighted with distinctive
1914 If the permission highlighting is enabled, the parts of the
1921 which apply to the user running Midnight Commander are highlighted with
1922 the color defined by the
1924 keyword. If the file type highlighting is enabled, file names are colored
1925 according to rules described in @sysconfdir@/mc/filehighlight.ini file. See
1928 .\"Filenames Highlight"
1932 .I Show Mini\-Status
1933 option is enabled, one line of status information about the currently
1934 selected item is shown at the bottom of the panels.
1936 When run in a terminal emulator for X11, Midnight Commander sets the
1937 terminal window title to the current working directory and updates it
1938 when necessary. If your terminal emulator is broken and you see some
1939 incorrect output on startup and directory change, turn off the
1940 .I Xterm Window Title
1942 .\"NODE " Confirmation"
1944 In this dialog you configure the confirmation options for file deletion,
1945 overwriting files, execution by pressing enter, quitting the program,
1946 directory hotlist entries deletion and history cleanup.
1948 .\"NODE " Display bits"
1950 This is used to configure the range of visible characters on the
1951 screen. This setting may be 7\-bits if your terminal/curses supports
1952 only seven output bits, ISO\-8859\-1 displays all the characters in the
1953 ISO\-8859\-1 map and full 8 bits is for those terminals that can display
1954 full 8 bit characters.
1955 .\"NODE " Learn keys"
1957 This dialog allows you to test and redefine functional keys, cursor
1958 arrows and some other keys to make them work properly on your terminal.
1959 They often don't, since many terminal databases are incomplete or broken.
1961 You can move around with the Tab key and with the vi moving keys ('h'
1962 left, 'j' down, 'k' up and 'l' right). Once you press any cursor movement
1963 key and it is recognized, you can use that key as well.
1965 You can test keys just by pressing each of them. When you press a
1966 key and it is recognized properly, OK should appear next to the name
1967 of that key. Once a key is marked OK it starts working as usually,
1968 e.g. F1 pressed the first time will just check that the F1 key works,
1969 but after that it will show help. The same applies to the arrow keys.
1970 The Tab key should be working always.
1972 If some keys do not work properly then you won't see OK appear after
1973 pressing one of these. Then you may want to redefine it. Do it by pressing
1974 the button with the name of that key (either by the mouse or by Enter
1975 or Space after selecting the button with Tab or arrows). Then a message
1976 box will appear asking you to press that key. Do it and wait until the
1977 message box disappears. If you want to abort, just press Escape once
1980 When you finish with all the keys, you can Save them. The definitions
1981 for the keys you have redefined will be written into the [terminal:TERM]
1982 section of your ~/.mc/ini file (where TERM is the name of your current
1983 terminal). The definitions of the keys that were already working properly
1985 .\"NODE " Virtual FS"
1987 This option gives you control over the settings of the
1989 Virtual File System\&.
1990 .\"Virtual File System"
1992 The Midnight Commander keeps in memory the information related to some
1993 of the virtual file systems to speed up the access to the files in the
1994 file system (for example, directory listings fetched from FTP servers).
1996 Also, in order to access the contents of compressed files (for example,
1997 compressed tar files) the Midnight Commander needs to create temporary
1998 uncompressed files on your disk.
2000 Since both the information in memory and the temporary files on disk
2001 take up resources, you may want to tune the parameters of the cached
2002 information to decrease your resource usage or to maximize the speed of
2003 access to frequently used file systems.
2005 Because of the format of the tar archives, the
2007 needs to read the whole file just to load the file entries. Since most
2008 tar files are usually kept compressed (plain tar files are species in
2009 extinction), the tar file system has to uncompress the file on the disk
2010 in a temporary location and then access the uncompressed file as a
2013 Now, since we all love to browse files and tar files all over the disk,
2014 it's common that you will leave a tar file and the re\-enter it later.
2015 Since decompression is slow, the Midnight Commander will cache the
2016 information in memory for a limited time. When the timeout expires, all
2017 the resources associated with the file system are released. The default
2018 timeout is set to one minute.
2024 (ftpfs) allows you to browse directories on remote FTP servers. It has
2027 .I ftp anonymous password
2028 is the password used when you login as "anonymous". Some sites require
2029 a valid e\-mail address. On the other hand, you probably don't want to
2030 give your real e\-mail address to untrusted sites, especially if you are
2031 not using spam filtering.
2033 ftpfs keeps the directory listing it fetches from a FTP server in a cache.
2034 The cache expire time is configurable with the
2035 .I ftpfs directory cache timeout
2036 option. A low value for this option may slow down every operation on
2037 the ftpfs because every operation would require sending a request to the
2040 You can define an FTP proxy host for doing FTP. Note that most modern
2041 firewalls are fully transparent at least for passive FTP (see below), so
2042 FTP proxies are considered obsolete.
2045 .I Always use ftp proxy
2046 is not set, you can use the exclamation sign to enable proxy for certain
2053 If this option is set, the program will do two things: consult the
2054 @prefix@/lib/mc/mc.no_proxy file for lines containing host names that
2055 are local (if the host name starts with a dot, it is assumed to be a
2056 domain) and to assume that any hostnames without dots in their names are
2057 directly accessible. All other hosts will be accessed through the
2058 specified FTP proxy.
2060 You can enable using
2062 file, which keeps login names and passwords for ftp servers. See netrc
2063 (5) for the description of the .netrc format.
2066 enables using FTP passive mode, when the connection for data transfer is
2067 initiated by the client, not by the server. This option is recommended
2068 and enabled by default. If this option is turned off, the data
2069 connection is initiated by the server. This may not work with some
2071 .\"NODE " Save Setup"
2073 At startup the Midnight Commander will try to load initialization
2074 information from the ~/.mc/ini file. If this file doesn't exist, it will
2075 load the information from the system\-wide configuration file, located in
2076 @prefix@/share/mc/mc.ini. If the system\-wide configuration file doesn't
2077 exist, MC uses the default settings.
2081 command creates the ~/.mc/ini file by saving the current settings
2085 .\"Left and Right Menus"
2094 option, MC will always save the current settings when exiting.
2096 There also exist settings which can't be changed from the menus. To
2097 change these settings you have to edit the setup file with your
2098 favorite editor. See the section on
2101 .\"Special Settings"
2102 for more information.
2104 .\"NODE "Executing operating system commands"
2105 .SH "Executing operating system commands"
2106 You may execute commands by typing them directly in the Midnight
2107 Commander's input line, or by selecting the program you want to
2108 execute with the selection bar in one of the panels and hitting Enter.
2110 If you press Enter over a file that is not executable, the Midnight
2111 Commander checks the extension of the selected file against the
2115 .\"Extension File Edit"
2116 If a match is found then the code associated with that extension is
2117 executed. A very simple
2120 .\"Macro Substitution"
2121 takes place before executing the command.
2122 .\"NODE " The cd internal command"
2123 .SH " The cd internal command"
2126 command is interpreted by the Midnight Commander, it is not passed to
2127 the command shell for execution. Thus it may not handle all of the
2128 nice macro expansion and substitution that your shell does, although it
2131 .I Tilde substitution.
2132 The (~) will be substituted with your home directory, if you append a
2133 username after the tilde, then it will be substituted with the login
2134 directory of the specified user.
2136 For example, ~guest is the home directory for the user guest, while
2137 ~/guest is the directory guest in your home directory.
2139 .I Previous directory.
2140 You can jump to the directory you were previously by using the special
2141 directory name '\-' like this:
2144 .I CDPATH directories.
2145 If the directory specified to the
2147 command is not in the current directory, then The Midnight Commander
2148 uses the value in the environment variable
2150 to search for the directory in any of the named directories.
2152 For example you could set your
2154 variable to ~/src:/usr/src, allowing you to change your directory to
2155 any of the directories inside the ~/src and /usr/src directories, from
2156 any place in the file system by using its relative name (for example
2157 cd linux could take you to /usr/src/linux).
2158 .\"NODE " Macro Substitution"
2159 .SH " Macro Substitution"
2166 extension dependent command\&,
2167 .\"Extension File Edit"
2168 or running a command from the command line input, a simple macro
2169 substitution takes place.
2174 The indent of blank space, equal the cursor column position. For edit
2178 The syntax type of current file. For edit menu only.
2181 The block file name.
2184 The error file name.
2187 The current menu name.
2190 The current file name.
2193 The extension of current file name.
2196 The current file name without extension.
2199 The current directory name.
2202 The current file in the unselected panel.
2205 The directory name of the unselected panel.
2208 The currently tagged files.
2211 The tagged files in the unselected panel.
2214 Similar to the %t and %T macros, but in addition the files are untagged.
2215 You can use this macro only once per menu file entry or extension file
2216 entry, because next time there will be no tagged files.
2219 The selected files: The tagged files if there are any. Otherwise the
2223 This is a special macro that is used to change the current directory
2224 to the directory specified in front of it. This is used primarily as
2227 Virtual File System\&.
2228 .\"Virtual File System"
2231 This macro is used to invoke the internal viewer. This macro can be
2232 used alone, or with arguments. If you pass any arguments to this
2233 macro, they should be enclosed in brackets.
2237 to force the viewer into ascii mode;
2239 to force the viewer into hex mode;
2241 to tell the viewer that it should interpret the bold and underline
2244 to tell the viewer to not interpret nroff commands for making the text
2251 Prompt for the substitution. An input box is shown and the text inside
2252 the braces is used as a prompt. The macro is substituted by the text
2253 typed by the user. The user can press ESC or F10 to cancel. This macro
2254 doesn't work on the command line yet.
2256 .I %var{ENV:default}
2257 If environment variable
2261 is substituted. Otherwise, the value of
2264 .\"NODE " The subshell support"
2265 .SH " The subshell support"
2266 The subshell support is a compile time option, that works with the
2267 shells: bash, tcsh and zsh.
2269 When the subshell code is activated the Midnight Commander will
2270 spawn a concurrent copy of your shell (the one defined in the
2272 variable and if it is not defined, then the one in the /etc/passwd
2273 file) and run it in a pseudo terminal, instead of invoking a new shell
2274 each time you execute a command, the command will be passed to the
2275 subshell as if you had typed it. This also allows you to change the
2276 environment variables, use shell functions and define aliases that are
2277 valid until you quit the Midnight Commander.
2281 you can specify startup
2282 commands for the subshell in your ~/.mc/bashrc file and
2283 special keyboard maps in the ~/.mc/inputrc file.
2285 users may specify startup commands in the ~/.mc/tcshrc file.
2287 When the subshell code is used, you can suspend applications at any
2288 time with the sequence C\-o and jump back to the Midnight Commander, if
2289 you interrupt an application, you will not be able to run other
2290 external commands until you quit the application you interrupted.
2292 An extra added feature of using the subshell is that the prompt
2293 displayed by the Midnight Commander is the same prompt that you are
2294 currently using in your shell.
2300 section has more information on how you can control the subshell code.
2303 The Chmod window is used to change the attribute bits in a group of
2304 files and directories. It can be invoked with the C\-x c key combination.
2306 The Chmod window has two parts \-
2311 In the File section are displayed the name of the file or directory
2312 and its permissions in octal form, as well as its owner and group.
2314 In the Permissions section there is a set of check buttons which
2315 correspond to the file attribute bits. As you change the attribute
2316 bits, you can see the octal value change in the File section.
2318 To move between the widgets (buttons and check buttons) use the
2322 key. To change the state of the check buttons or to select a button
2325 You can also use the hotkeys on the buttons to quickly activate them.
2326 Hotkeys are shown as highlighted letters on the buttons.
2328 To set the attribute bits, use the Enter key.
2330 When working with a group of files or directories, you just click on
2331 the bits you want to set or clear. Once you have selected the bits
2332 you want to change, you select one of the action buttons (Set marked
2335 Finally, to set the attributes exactly to those specified, you can use
2338 button, which will act on all the tagged files.
2341 set only marked attributes to all selected files
2344 set marked bits in attributes of all selected files
2347 clear marked bits in attributes of all selected files
2350 set the attributes of one file
2353 cancel the Chmod command
2356 The Chown command is used to change the owner/group of a file. The hot
2357 key for this command is C\-x o.
2358 .\"NODE "Advanced Chown"
2359 .SH "Advanced Chown"
2360 The Advanced Chown command is the
2368 command combined into one window. You can change the permissions and
2369 owner/group of files at once.
2370 .\"NODE "File Operations"
2371 .SH "File Operations"
2372 When you copy, move or delete files the Midnight Commander shows the
2373 file operations dialog. It shows the files currently being processed
2374 and uses up to three progress bars. The file bar indicates the
2375 percentage of the current file that has been processed so far. The
2376 count bar shows how many of the tagged files have been handled. The
2377 bytes bar indicates the percentage of the total size of the tagged files
2378 that has been handled. If the verbose option is off, the file and bytes
2381 There are two buttons at the bottom of the dialog. Pressing the Skip
2382 button will skip the rest of the current file. Pressing the Abort
2383 button will abort the whole operation, the rest of the files are
2386 There are three other dialogs which you can run into during the file
2389 The error dialog informs about error conditions and has three choices.
2390 Normally you select either the Skip button to skip the file or the Abort
2391 button to abort the operation altogether. You can also select the Retry
2392 button if you fixed the problem from another terminal.
2394 The replace dialog is shown when you attempt to copy or move a file on
2395 the top of an existing file. The dialog shows the dates and sizes of
2396 the both files. Press the Yes button to overwrite the file, the No
2397 button to skip the file, the All button to overwrite all the files, the
2398 None button to never overwrite and the Update button to overwrite if the
2399 source file is newer than the target file. You can abort the whole
2400 operation by pressing the Abort button.
2402 The recursive delete dialog is shown when you try to delete a directory
2403 which is not empty. Press the Yes button to delete the directory
2404 recursively, the No button to skip the directory, the All button to
2405 delete all the directories and the None button to skip all the non\-empty
2406 directories. You can abort the whole operation by pressing the Abort
2407 button. If you selected the Yes or All button you will be asked for a
2408 confirmation. Type "yes" only if you are really sure you want to do the
2411 If you have tagged files and perform an operation on them only the files
2412 on which the operation succeeded are untagged. Failed and skipped files
2414 .\"NODE "Mask Copy/Rename"
2415 .SH "Mask Copy/Rename"
2416 The copy/move operations let you translate the names of files in an
2417 easy way. To do it, you have to specify the correct source mask and
2418 usually in the trailing part of the destination specify some wildcards.
2419 All the files matching the source mask are copied/renamed according to
2420 the target mask. If there are tagged files, only the tagged files
2421 matching the source mask are renamed.
2423 There are other options which you can set:
2427 determines whether make the symlinks and hardlinks in the source
2428 directory (recursively in subdirectories) new links in the target
2429 directory or whether would you like to copy their content.
2431 .B Dive into subdirs
2433 determines the behavior when the source directory is about to be copied,
2434 but the target directory already exists. The default action is to copy
2435 the contents of the source directory into the target directory.
2436 Enabling this option causes copying the source directory itself into the
2439 For example, you want to copy directory
2445 which is an already existing directory. Normally (when
2446 .B Dive into subdirs
2447 is not set), mc would copy file
2451 By enabling this option the
2453 directory will be created, and
2456 .IR /bla/foo/foo/bar .
2458 .B Preserve attributes
2460 determines whether to preserve the permissions, timestamps and (if you
2461 are root) the ownership of the original files. If this option is not
2462 set, the current value of the umask will be respected.
2464 .B Use shell patterns on
2466 When the shell patterns option is on you can use the '*' and '?'
2467 wildcards in the source mask. They work like they do in the shell. In
2468 the target mask only the '*' and '\\<digit>' wildcards are allowed. The
2469 first '*' wildcard in the target mask corresponds to the first wildcard
2470 group in the source mask, the second '*' corresponds to the second group
2471 and so on. The '\\1' wildcard corresponds to the first wildcard group
2472 in the source mask, the '\\2' wildcard corresponds to the second group
2473 and so on all the way up to '\\9'. The '\\0' wildcard is the whole
2474 filename of the source file.
2478 If the source mask is "*.tar.gz", the destination is "/bla/*.tgz" and the
2479 file to be copied is "foo.tar.gz", the copy will be "foo.tgz" in "/bla".
2481 Suppose you want to swap basename and extension so that "file.c" would
2482 become "c.file" and so on. The source mask for this is "*.*" and the
2483 destination is "\\2.\\1".
2485 .B Use shell patterns off
2487 When the shell patterns option is off the MC doesn't do automatic
2488 grouping anymore. You must use '\\(...\\)' expressions in the source
2489 mask to specify meaning for the wildcards in the target mask. This is
2490 more flexible but also requires more typing. Otherwise target masks
2491 are similar to the situation when the shell patterns option is on.
2495 If the source mask is "^\\(.*\\)\\.tar\\.gz$", the destination is
2496 "/bla/*.tgz" and the file to be copied is "foo.tar.gz", the copy
2497 will be "/bla/foo.tgz".
2499 Let's suppose you want to swap basename and extension so that "file.c"
2500 will become "c.file" and so on. The source mask for this is
2501 "^\\(.*\\)\\.\\(.*\\)$" and the destination is "\\2.\\1".
2505 You can also change the case of the filenames. If you use '\\u'
2506 or '\\l' in the target mask, the next character will be converted to
2507 uppercase or lowercase correspondingly.
2509 If you use '\\U' or '\\L' in the target mask, the next characters will
2510 be converted to uppercase or lowercase correspondingly up to the
2511 next '\\E' or next '\\U', '\\L' or the end of the file name.
2513 The '\\u' and '\\l' are stronger than '\\U' and '\\L'.
2515 For example, if the source mask is '*' (shell patterns on) or '^\\(.*\\)$'
2516 (shell patterns off) and the target mask is '\\L\\u*' the file names
2517 will be converted to have initial upper case and otherwise lower case.
2519 You can also use '\\' as a quote character. For example, '\\\\' is
2520 a backslash and '\\*' is an asterisk.
2524 commands Midnight Commander, that it should change symlinks in the target,
2525 so that they'll point to the same location as it did before. With absolute
2526 symbolic links this does nothing, but if you have a relative one, it will
2527 recompute its value, adding necessary ../ and other directory parts and making
2528 the value as short as possible (most modern filesystems keep short symlinks
2529 inside inodes and thus don't waste much disk space).
2531 .\"NODE "Select/Unselect Files"
2532 .SH "Select/Unselect Files"
2533 The dialog of group of files and directories selection or uselection.
2538 allow enter the regular expression of filenames that will be
2539 selected/unselected.
2543 checkbox is on, only files will be selected. If
2545 is off, as files as directories will be selected.
2548 checkbox is on, the regular expression is much like the filename globbing
2549 in the shell (* standing for zero or more characters and ? standing
2550 for one character). If
2552 is off, then the tagging of files is done with normal regular
2553 expressions (see ed (1)). When
2555 checkbox is on, the selection will be case sensitive characters.
2558 is off, the case will be ignored.
2559 .\"NODE "Internal File Viewer"
2560 .SH "Internal File Viewer"
2561 The internal file viewer provides two display modes: ASCII and hex.
2562 To toggle between modes, use the F4 key.
2564 The viewer will try to use the best method provided by your system or
2565 the file type to display the information.
2566 Some character sequences, which appear most often in preformatted manual
2567 pages, are displayed bold and underlined, thus making a pretty display
2570 When in hex mode, the search function accepts text in quotes and
2571 constant numbers. Text in quotes is matched exactly after removing
2572 the quotes. Each number matches one byte. You can mix quoted text
2573 with constants like this:
2576 "String" \-1 0xBB 012 "more text"
2579 Note that 012 is an octal number. \-1 is converted to 0xFF.
2581 Here is a listing of the actions associated with each key that the
2582 Midnight Commander handles in the internal file viewer.
2585 Invoke the built\-in hypertext help viewer.
2588 Toggle the wrap mode.
2591 Toggle the hex mode.
2594 Goto line. This will prompt you for a line number and will display
2598 Regular expression search.
2601 Reverse regular expression search.
2604 Normal search / hex mode search.
2607 Start normal search if there was no previous search expression else
2611 Start reverse search if there was no previous search expression else
2615 Toggle Raw/Parsed mode: This will show the file as found on disk or if
2616 a processing filter has been specified in the mc.ext file, then the
2617 output from the filter. Current mode is always the other than written
2618 on the button label, since on the button is the mode which you enter
2622 Toggle the format/unformat mode: when format mode is on the viewer
2623 will interpret some string sequences to show bold and underline with
2624 different colors. Also, on button label is the other mode than current.
2627 Exit the internal file viewer.
2629 .B next\-page, space, C\-v.
2630 Scroll one page forward.
2632 .B prev\-page, Alt\-v, C\-b, backspace.
2633 Scroll one page backward.
2636 Scroll one line forward.
2639 Scroll one line backward.
2645 Switch to the subshell and show the command screen.
2648 Like C\-o, but run a new shell if the subshell is not running.
2657 Jump to the next file.
2660 Jump to the previous file.
2666 to change charset of displayed text may use M\-e (Alt\-e).
2667 Recoding is made from selected codepage into system codepage. To
2668 cancel the recoding you may select "<No translation>" in charset
2671 It's possible to instruct the file viewer how to display a file, look
2674 Extension File Edit section
2675 .\"Extension File Edit"
2677 .\"NODE "Internal File Editor"
2678 .SH "Internal File Editor"
2679 The internal file editor is a full\-featured full screen editor. It can
2680 edit files up to 64 megabytes. It is possible to edit binary files.
2681 The internal file editor is invoked using
2684 .I use_internal_edit
2685 option is set in the initialization file.
2687 The features it presently supports are: block copy, move, delete, cut,
2688 paste; key for key undo; pull\-down menus; file insertion; macro
2689 commands; regular expression search and replace; shift\-arrow text highlighting
2690 (if supported by the terminal); insert\-overwrite toggle; word wrap;
2691 autoindent; tunable tab size; syntax highlighting for various file
2692 types; and an option to pipe text blocks through shell commands like
2699 Options of editor in ini-file
2700 .\"Internal File Editor / options"
2703 The editor is very easy to use and requires no tutoring. To see what
2704 keys do what, just consult the appropriate pull\-down menu. Other keys
2705 are: Shift movement keys do text highlighting.
2711 pastes from cooledit.clip.
2717 deletes highlighted text. Mouse highlighting also works, and you
2718 can override the mouse as usual by holding down the shift key
2719 while dragging the mouse to let normal terminal mouse highlighting
2722 To define a macro, press
2724 and then type out the key
2725 strokes you want to be executed. Press
2727 again when finished. You can then assign the macro to any key you
2728 like by pressing that key. The macro is executed when you press
2730 and then the assigned key. The macro is also executed if
2731 you press Meta, Ctrl, or Esc and the assigned key, provided that the
2732 key is not used for any other function. Once defined, the macro
2733 commands go into the file
2734 .B .mc/cedit/cooledit.macros
2735 in your home directory. You can delete a macro by deleting the
2736 appropriate line in this file.
2739 To change charset of displayed text may use M\-e (Alt\-e).
2740 Recoding is made from selected codepage into system codepage. To
2741 cancel the recoding you may select "<No translation>" in charset
2746 will format the currently highlighted block (plain text or
2750 code or another). This is controlled by the
2752 .B @prefix@/share/mc/edit.indent.rc
2754 .B .mc/cedit/edit.indent.rc
2755 in your home directory the first time you use it.
2757 The editor also displays non\-us characters (160+). When editing
2758 binary files, you should set
2760 to 7 bits in the options menu to keep the spacing clean.
2762 .\"NODE "Internal File Editor / options"
2763 .SH "Options of editor in ini-file"
2765 In this section described some options in ini-file.
2766 Options placed in '[Midnight Commander]' section
2769 .I editor_wordcompletion_collect_entire_file
2770 Search autocomplete candidates in entire of file or just from
2771 begin of file to cursor position (0)
2774 .\"NODE "Completion"
2776 Let the Midnight Commander type for you.
2778 Attempt to perform completion on the text before current position. MC
2779 attempts completion treating the text as variable (if the text begins
2782 username (if the text begins with
2784 hostname (if the text begins with
2786 or command (if you are on the command line in the position where you
2787 might type a command, possible completions then include shell reserved
2788 words and shell built\-in commands as well) in turn. If none of these
2789 matches, filename completion is attempted.
2791 Filename, username, variable and hostname completion works on all input
2792 lines, command completion is command line specific. If the completion
2793 is ambiguous (there are more different possibilities), MC beeps and the
2794 following action depends on the setting of the
2795 .I Complete: show all
2800 dialog. If it is enabled, a list of all possibilities pops up next to
2801 the current position and you can select with the arrow keys and
2803 the correct entry. You can also type the first letters in which the
2804 possibilities differ to move to a subset of all possibilities and
2805 complete as much as possible. If you press
2807 again, only the subset will be shown in the listbox, otherwise the first
2808 item which matches all the previous characters will be highlighted. As
2809 soon as there is no ambiguity, dialog disappears, but you can hide it by
2813 and left and right arrow keys. If
2817 is disabled, the dialog pops up only if you press
2819 for the second time, for the first time MC just beeps.
2820 .\"NODE "Virtual File System"
2821 .SH "Virtual File System"
2822 The Midnight Commander is provided with a code layer to access the file
2823 system; this code layer is known as the virtual file system switch. The
2824 virtual file system switch allows the Midnight Commander to manipulate
2825 files not located on the Unix file system.
2827 Currently the Midnight Commander is packaged with some Virtual File
2830 file system, used for accessing the regular Unix file system; the
2832 used to manipulate files on remote systems with the FTP protocol; the
2834 used to manipulate tar and compressed tar files; the
2836 used to recover deleted files on ext2 file systems (the default file
2837 system for Linux systems),
2839 (for manipulating files over shell connections such as rsh and ssh) and
2842 (Midnight Commander file system), a network based file system. If the
2843 code was compiled with
2845 support, you can manipulate files on remote systems with the SMB (CIFS)
2850 (EXTernal virtual File System) is provided in order to easily expand
2851 VFS capabilities using scripts and external software.
2853 The VFS switch code will interpret all of the path names used and will
2854 forward them to the correct file system, the formats used for each one
2855 of the file systems is described later in their own section.
2856 .\"NODE " FTP File System"
2857 .SH " FTP File System"
2858 The FTP File System (ftpfs) allows you to manipulate files on remote
2859 machines. To actually use it, you can use the
2861 item in the menu or directly change your current directory using the
2863 command to a path name that looks like this:
2865 .I /#ftp:[!][user[:pass]@]machine[:port][remote\-dir]
2872 elements are optional. If you specify the
2874 element, the Midnight Commander will login to the remote machine as that
2875 user, otherwise it will use anonymous login or the login name from the
2879 element is the password used for the connection. Using the password in
2880 the VFS directory name is not recommended, because it can appear on the
2881 screen in clear text and can be saved to the directory history.
2883 To enable using FTP proxy, prepend
2885 (an exclamation sign) to the hostname.
2890 /#ftp:ftp.nuclecu.unam.mx/linux/local
2891 /#ftp:tsx\-11.mit.edu/pub/linux/packages
2892 /#ftp:!behind.firewall.edu/pub
2893 /#ftp:guest@remote\-host.com:40/pub
2894 /#ftp:miguel:xxx@server/pub
2901 dialog box for ftpfs options.
2902 .\"NODE " Tar File System"
2903 .SH " Tar File System"
2904 The tar file system provides you with read\-only access to your tar
2905 files and compressed tar files by using the chdir command. To change
2906 your directory to a tar file, you change your current directory to the
2907 tar file by using the following syntax:
2909 .I /filename.tar#utar/[dir\-inside\-tar]
2911 The mc.ext file already provides a shortcut for tar files, this means
2912 that usually you just point to a tar file and press return to enter
2913 into the tar file, see the
2916 .\"Extension File Edit"
2917 section for details on how this is done.
2922 mc\-3.0.tar.gz#utar/mc\-3.0/vfs
2923 /ftp/GCC/gcc\-2.7.0.tar#utar
2926 The latter specifies the full path of the tar archive.
2927 .\"NODE " FIle transfer over SHell filesystem"
2928 .SH " FIle transfer over SHell filesystem"
2929 The fish file system is a network based file system that allows you to
2930 manipulate the files in a remote machine as if they were local. To use
2931 this, the other side has to either run fish server, or has to have
2932 bash\-compatible shell.
2934 To connect to a remote machine, you just need to chdir
2935 into a special directory which name is in the following
2938 .I /#sh:[user@]machine[:options]/[remote\-dir]
2945 elements are optional. If you specify the
2947 element, the Midnight Commander will try to login on the remote
2948 machine as that user, otherwise it will use your login name.
2954 'C' \- use compression;
2955 'r' \- use rsh instead of ssh;
2956 port \- specify the port used by remote server.
2960 element is present, your current directory on the remote machine will be
2966 /#sh:onlyrsh.mx:r/linux/local
2967 /#sh:joe@want.compression.edu:C/private
2968 /#sh:joe@noncompressed.ssh.edu/private
2969 /#sh:joe@somehost.ssh.edu:2222/private
2971 .\"NODE " Network File System"
2972 .SH " Network File System"
2973 The Midnight Commander file system is a network base file system that
2974 allows you to manipulate the files in a remote machine as if they were
2975 local. To use this, the remote machine must be running the mcserv(8)
2978 To connect to a remote machine, you just need to chdir into a special
2979 directory which name is in the following format:
2981 .I /#mc:[user@]machine[:port][remote\-dir]
2987 elements are optional. If you specify the
2989 element then the Midnight Commander will try to logon on the remote
2990 machine as that user, otherwise it will use your login name.
2994 element is used when the remote server is running on a special port
2995 (see the mcserv(8) manual page for more information about ports);
2998 element is present, your current directory on the remote machine will
3004 /#mc:ftp.nuclecu.unam.mx/linux/local
3005 /#mc:joe@foo.edu:11321/private
3007 .\"NODE " Undelete File System"
3008 .SH " Undelete File System"
3009 On Linux systems, if you asked configure to use the ext2fs undelete
3010 facilities, you will have the undelete file system available.
3011 Recovery of deleted files is only available on ext2 file systems. The
3012 undelete file system is just an interface to the ext2fs library to
3013 retrieve all of the deleted files names on an ext2fs and provides and
3014 to extract the selected files into a regular partition.
3016 To use this file system, you have to chdir into the special file name
3017 formed by the "/#undel" prefix and the file name where the actual
3018 file system resides.
3020 For example, to recover deleted files on the second partition of the
3021 first SCSI disk on Linux, you would use the following path name:
3027 It may take a while for the undelfs to load the required information
3028 before you start browsing files there.
3029 .\"NODE " SMB File System"
3030 .SH " SMB File System"
3031 The smbfs allows you to manipulate files on remote machines with SMB
3032 (or CIFS) protocol. These include Windows for Workgroups,
3033 Windows 9x/ME/XP, Windows NT, Windows 2000 and Samba.
3034 To actually use it, you may try to use the panel command "SMB link..."
3035 (accessible from the menubar) or you may directly change your current
3036 directory to it using the cd command to a path name that looks like this:
3038 .I /#smb:[user@]machine[/service][/remote\-dir]
3045 elements are optional.
3051 can be specified in an input dialog.
3058 /#smb:guest@machine/Public/Irlex
3060 .\"NODE " EXTernal File System"
3061 .SH " EXTernal File System"
3063 allows to integrate numerous features and file types into GNU Midnight
3064 Commander in an easy way, by writing scripts.
3066 Extfs filesystems can be divided into two categories:
3068 1. Stand\-alone filesystems, which are not associated with any existing
3069 file. They represent certain system\-wide data as a directory tree.
3070 You can invoke them by typing
3071 .RI ' "cd #fsname" '
3072 where fsname is an extfs short name (see below). Examples of such
3073 filesystems include audio (list audio tracks on the CD) or apt (list of
3074 all Debian packages in the system).
3076 For example, to list CD\-Audio tracks on your CD\-ROM drive, type
3082 2. 'Archive' filesystems (like rpm, patchfs and more), which represent
3083 contents of a file as a directory tree. It can consist of 'real' files
3084 compressed in an archive (urar, rpm) or virtual files, like messages
3085 in a mailbox (mailfs) or parts of a patch (patchfs). To access such
3088 should be appended to the archive name. Note that the archive itself
3089 can be on another vfs.
3091 For example, to list contents of a zip archive documents.zip type
3094 cd documents.zip#uzip
3097 In many aspects, you could treat extfs like any other directory. For
3098 instance, you can add it to the hotlist or change to it from directory
3099 history. An important limitation is that you cannot invoke shell
3100 commands inside extfs, just like any other non\-local VFS.
3102 Common extfs scripts included with Midnight Commander are:
3105 access 'A:' DOS/Windows diskette
3109 front end to Debian's APT package management system
3113 audio CD ripping and playing
3116 .IR "cd device#audio" ).
3119 package of Bad Penguin GNU/Linux distribution
3120 .RI ( "cd file.bpp#bpp" ).
3123 package of Debian GNU/Linux distribution
3124 .RI ( "cd file.deb#deb" ).
3127 Debian GNU/Linux installed packages
3131 view and copy files to/from a HP48 calculator
3135 browsing of lslR listings as found on many FTPs
3136 .RI ( "cd filename#lslR" ).
3139 mbox\-style mailbox files support
3140 .RI ( "cd mailbox#mailfs" ).
3143 extfs to handle unified and context diffs
3144 .RI ( "cd filename#patchfs" ).
3148 .RI ( "cd filename#rpm" ).
3151 RPM database management
3154 .B ulha, urar, uzip, uzoo, uar, uha
3156 .RI ( "cd archive#xxxx"
3157 where xxxx is one of:
3165 You could bind file type/extension to specified extfs as described in the
3168 .\"Extension File Edit"
3169 section. Here is an example entry for Debian packages:
3177 The Midnight Commander will try to detect if your terminal supports
3178 color using the terminal database and your terminal name. Sometimes
3179 it gets confused, so you may force color mode or disable color mode
3180 using the \-c and \-b flag respectively.
3182 If the program is compiled with the Slang screen manager instead of
3183 ncurses, it will also check the variable
3185 if it is set, it has the same effect as the \-c flag.
3187 You may specify terminals that always force color mode
3190 variable to the Colors section of the initialization file. This will
3191 prevent the Midnight Commander from trying to detect if your terminal
3192 supports color. Example:
3196 color_terminals=linux,xterm
3197 color_terminals=terminal\-name1,terminal\-name2...
3200 The program can be compiled with both ncurses and slang, ncurses does
3201 not provide a way to force color mode: ncurses uses just the
3202 information in the terminal database.
3204 The Midnight Commander provides a way to change the default colors.
3205 Currently the colors are configured using the environment variable
3207 or the Colors section in the initialization file.
3209 In the Colors section, the default color map is loaded from the
3211 variable. You can specify an alternate color map for a terminal by
3212 using the terminal name as the key in this section. Example:
3217 xterm=menu=magenta:marked=,magenta:markselect=,red
3220 The format for the color definition is:
3223 <keyword>=<foregroundcolor>,<backgroundcolor>:<keyword>= ...
3226 The colors are optional, and the keywords are: normal, selected, marked,
3227 markselect, errors, input, reverse, gauge. Menu colors are: menu,
3228 menusel, menuhot, menuhotsel, menuinactive. Dialog colors are: dnormal, dfocus,
3229 dhotnormal, dhotfocus. Help colors are: helpnormal, helpitalic,
3230 helpbold, helplink, helpslink. Viewer color is: viewunderline. Editor
3231 colors are: editnormal, editbold, editmarked.
3234 determines the color of input lines used in query dialogs.
3237 determines the color of the filled part of the progress bar (gauge),
3238 which is used to show the user the progress of file operations, such as
3241 The dialog boxes use the following colors:
3243 is used for the normal text,
3245 is the color used for the currently selected component,
3247 is the color used to differentiate the hotkey color in normal
3248 components, whereas the
3250 color is used for the highlighted color in the currently selected
3253 Menus use the same scheme but uses the menu, menusel, menuhot, menuhotsel
3254 and menuinactive tags instead.
3256 Help uses the following colors:
3258 is used for normal text,
3260 is used for text which is emphasized in italic in the manual page,
3262 is used for text which is emphasized in bold in the manual page,
3264 is used for not selected hyperlinks and
3266 is used for selected hyperlink.
3268 The possible colors are: black, gray, red, brightred, green,
3269 brightgreen, brown, yellow, blue, brightblue, magenta, brightmagenta,
3270 cyan, brightcyan, lightgray and white. And there is a special keyword
3271 for transparent background. It is 'default'. The 'default' can only be
3272 used for background color. Example:
3276 base_color=normal=white,default:marked=magenta,default
3281 You can change the appearance of Midhight Commander.
3282 To do this, you must specify a file that contain descriptions of colors
3283 and lines to draw boxes. Redefining of the colors is entirely compatible
3284 with the assignment of colors, as described in Section
3289 A skin\-file is searched on the following algorithm (to the first one found):
3292 1) command line option
3295 .B \-\-skin=\<skin\>
3297 2) Environment variable
3300 3) In config file parameter
3303 .B [Midnight Commander]
3306 .B @sysconfdir@/mc/skins/default.ini
3309 .B @prefix@/share/mc/skins/default.ini
3312 Command line option, environment variable and parameter in config file may
3313 contain the absolute path to the skin\-file (with the extension \.ini
3314 or without it). Search of skin\-file will occur in (to the first one found):
3320 .B @sysconfdir@/mc/skins/
3323 .B @prefix@/share/mc/skins/
3327 For getting extended info, refer to:
3330 Description of section and parameters
3334 Color pair definitions
3346 .\"NODE " Skins sections"
3347 .SH " Description of section and parameters"
3351 contain metainfo for skin\-file. Parameter
3353 contain short text about skin.
3358 contain descriptions of color pairs for filenames highlighting.
3359 Name of parameters must be equal to names of sections into
3360 filehighlight.ini file.
3364 .\"Filenames Highlight"
3365 for getting more info.
3370 describes the elements that are used everywhere.
3373 Default color pair. Used in all other sections if they not contain
3383 cursor on selected data
3386 color of the filled part of the progress bar
3389 color of input lines used in query dialogs.
3397 describes the elements that are placed on dialog windows (except error dialogs).
3400 Default color for this section. Used [core]._default_ if not specified
3403 Color of active element (in focus)
3409 Color of hotkeys in focused element
3414 describes the elements that are placed on error dialog windows
3417 Default color for this section. Used [core]._default_ if not specified
3423 Color of hotkeys in focused element
3428 describes the elements that are placed on menu. This section describes
3429 system menu (called by F9) and user-defined menus (called by F2 in panels
3430 and by F11 in editor).
3433 Default color for this section. Used [core]._default_ if not specified
3439 Color of menu hotkeys
3442 Color of active menu item (in focus)
3445 Color of menu hotkeys in focused menu item
3448 Color of inactive menu
3453 describes the elements that are placed on help window.
3456 Default color for this section. Used [core]._default_ if not specified
3459 Color pair for element with
3464 Color pair for element with
3472 Color of active link (on focus)
3477 describes the colors of elements placed in editor.
3480 Default color for this section. Used [core]._default_ if not specified
3483 Color pair for element with
3488 Color of selected text
3491 Color of tabs and trailing spaces highlighting
3494 Color for line state area
3499 describes the colors of elements placed in viewer.
3502 Color pair for element with
3506 .\"NODE " Skins colors"
3507 .SH " Color pair definitions"
3508 Any parameter in skin\-file contain definition of color pair.
3510 Color pairs described as two colors separated by ';'. First color
3511 sets the foreground color, second color sets background color.
3512 One of the colors may be omitted, in this case color will be
3513 taken from default color pair (global color pair or
3514 from default color pair of this section).
3521 _default_=green;black
3522 # green (default) on blue
3524 # yellow on black (default)
3529 Possible colors (names) described in
3535 .\"NODE " Skins lines"
3537 Lines sets in section
3539 into skin\-file. By default single lines are used, but you may redefine
3540 to usage of any utf\-8 symbols (like to lines, for example).
3543 When you build Midnight Commander with the Ncurses screen library
3544 usage of drawing lines is limited!
3545 Possible only drawing a single lines.
3546 For all questions and comments please contact the developers of Ncurses.
3549 Descriptions of parameters
3553 left-top line fragment.
3556 right-top line fragment.
3559 down branch of horizontal line
3562 up branch of horizontal line
3565 left-bottom line fragment
3568 right-bottom line fragment
3571 right branch of vertical line
3574 left branch of vertical line
3586 thin horizontal line
3592 .\"NODE " Skins oldcolors"
3593 .SH " Compatibility"
3595 Appointment of color by skin\-files fully compatible with
3596 the appointment of the colors described in
3602 In this case, reassignment of colors has priority over the skin file and is
3605 .\"NODE "Filenames Highlight"
3606 .SH "Filenames Highlight"
3607 Section [filehighlight] in current skin\-file contains key names as
3608 highlight groups and values as color pairs. Color pairs is documented
3615 Rules of filenames highlight are placed in @prefix@/share/mc/filehighlight.ini file
3616 (~/.mc/filehighlight.ini).
3617 Name of section in this file must be equal to parameters names in
3618 [filehighlight] section (in current skin\-file).
3620 Keys in these groups are:
3623 file type. If present, all other options are ignored.
3626 regular expression. If present, 'extensions' option is ignored.
3629 list of extensions of files. Separated by ';' sign.
3632 (make sense only with 'extensions' parameter) make 'extensions'
3633 rule case sentitive (true) or not (false).
3635 `type' key may have values:
3639 \- DIR (all directories)
3641 \- LINK (all links except stale link)
3645 \- DEVICE (all device files)
3648 \- SPECIAL (all special files)
3655 .\"NODE "Special Settings"
3656 .SH "Special Settings"
3657 Most of the Midnight Commander settings can be changed from the
3658 menus. However, there are a small number of settings which can only be
3659 changed by editing the setup file.
3661 These variables may be set in your ~/.mc/ini file:
3663 .I clear_before_exec
3664 By default the Midnight Commander clears the screen before executing a
3665 command. If you would prefer to see the output of the command at the
3666 bottom of the screen, edit your ~/.mc/ini file and change the value of
3667 the field clear_before_exec to 0.
3670 If you press F3 on a directory, normally MC enters that directory. If
3671 this flag is set to 1, then MC will ask for confirmation before changing
3672 the directory if you have files tagged.
3674 .I ftpfs_retry_seconds
3675 This value is the number of seconds the Midnight Commander will wait
3676 before attempting to reconnect to an FTP server that has denied the
3677 login. If the value is zero, the login will no be retried.
3680 Specifies how many screen updates can be skipped at most in the internal
3681 file viewer. Normally this value is not significant, because the code
3682 automatically adjusts the number of updates to skip according to the
3683 rate of incoming keystrokes. However, on very slow machines or
3684 terminals with a fast keyboard auto repeat, a big value can make screen
3687 It seems that setting max_dirt_limit to 10 causes the best behavior,
3688 and that is the default value.
3691 Controls whenever scrolling with the mouse is done by pages or line by
3694 .I mouse_move_pages_viewer
3695 Controls if scrolling with the mouse is done by pages or line by line
3696 on the internal file viewer.
3699 By default the Midnight Commander treats the ESC key as a key prefix
3700 (old_esc_mode=0). If this option is set (old_esc_mode=1), the ESC key
3701 will act as a prefix key for one second, and if no extra keys have
3702 arrived, then the ESC key is interpreted as a cancel key (ESC ESC).
3704 .I only_leading_plus_minus
3705 Allow special treatment for '+', '\-', '*' in the command line (select,
3706 unselect, reverse selection) only if the command line is empty. You
3707 don't need to quote those characters in the middle of the command line.
3708 On the other hand, you cannot use them to change selection when the
3709 command line is not empty.
3711 .I reverse_files_only
3712 Allow revert selection of files only. This variable is on by default.
3713 If on, the reverse selection is applied to files only, not to directories.
3714 The selection of directories is untouched. If off, the reverse
3715 selection is applied to files as well to directories: all unselected
3716 items become selected, and vice versa.
3718 .I panel_scroll_pages
3719 If set (the default), panel will scroll by half the display when the
3720 cursor reaches the end or the beginning of the panel, otherwise it
3721 will just scroll a file at a time.
3723 .I show_output_starts_shell
3724 This variable only works if you are not using the subshell support.
3725 When you use the C\-o keystroke to go back to the user screen, if this
3726 one is set, you will get a fresh shell. Otherwise, pressing any key
3727 will bring you back to the Midnight Commander.
3729 .I timeformat_recent
3730 Change the time format used to display dates less than 6 months from
3732 See strftime or date man page for the format specification. If this
3733 option is absent, default timeformat is used.
3736 Change the time format used to display dates older than 6 months from
3737 now or for dates in the future.
3738 See strftime or date man page for the format specification. If this
3739 option is absent, default timeformat is used.
3742 If this flag is set, then the home and end keys will work slightly
3743 different on the panels, instead of moving the selection to the first
3744 and last files in the panels, they will act as follows:
3746 The home key will: Go up to the middle line, if below it; else go to the
3747 top line unless it is already on the top line, in this case it will go
3748 to the first file in the panel.
3750 The end key has a similar behavior: Go down to the middle line, if over
3751 it; else go to the bottom line unless you already are at the bottom
3752 line, in such case it will move the selection to the last file name in
3755 .I use_file_to_guess_type
3756 If this variable is on (the default) it will spawn the file command to
3757 match the file types listed on the
3760 .\"Extension File Edit"
3763 If this variable is on (default is off) when you browse the file system
3764 on a Tree panel, it will automatically reload the other panel with the
3765 contents of the selected directory.
3767 .I fish_directory_timeout
3768 This variable holds the lifetime of a directory cache entry in seconds. The
3769 default value is 900 seconds.
3771 .I autodetect_codeset
3772 This option allows use the `enca' command to autodetect codeset of text files
3773 in internal viewer and editor. List of valid values can be obtain by the
3774 `enca \-\-list languages | cut \-d : \-f1' command. Option must be located
3775 in the [Misc] section.
3780 autodetect_codeset=russian
3782 .\"NODE "Terminal databases"
3783 .SH "Terminal databases"
3784 The Midnight Commander provides a way to fix your system terminal
3785 database without requiring root privileges. The Midnight Commander
3786 searches in the system initialization file (the mc.lib file located in
3787 the Midnight Commander library directory) and in the ~/.mc/ini file for
3788 the section "terminal:your\-terminal\-name" and then for the section
3789 "terminal:general", each line of the section contains a key symbol that
3790 you want to define, followed by an equal sign and the definition for the
3791 key. You can use the special \\e form to represent the escape character
3792 and the ^x to represent the control\-x character.
3794 The possible key symbols are:
3797 f0 to f20 Function keys f0\-f20
3804 right right arrow key
3807 insert the insert character
3808 delete the delete character
3809 complete to do completion
3812 For example, to define the key insert to be the Escape + [ + O + p, you
3813 set this in the ini file:
3820 Also now you can use
3821 .I extended learn keys.
3825 ctrl-alt-right=\\e[[1;6C
3826 ctrl-alt-left=\\e[[1;6D
3830 This means that ctrl+alt+left sends a \\e[[1;6D escape sequence
3831 and therefore Midnight Commander interprets "\\e[[1;6D" as Ctrl\-Alt\-Left.
3836 key symbol represents the escape sequences used to invoke the completion
3837 process, this is invoked with Alt\-tab, but you can define other keys to do
3838 the same work (on those keyboard with tons of nice and unused keys
3843 Full paths below may vary between installations. They are also affected
3844 by the MC_DATADIR environment variable. If it's set, its value is used
3845 instead of @prefix@/share/mc in the paths below.
3847 .I @prefix@/share/mc/mc.hlp
3849 The help file for the program.
3851 .I @prefix@/share/mc/mc.ext
3853 The default system\-wide extensions file.
3857 User's own extension, view configuration and edit configuration
3858 file. They override the contents of the system wide files if present.
3860 .I @prefix@/share/mc/mc.ini
3862 The default system\-wide setup for the Midnight Commander, used only if
3863 the user doesn't have his own ~/.mc/ini file.
3865 .I @prefix@/share/mc/mc.lib
3867 Global settings for the Midnight Commander. Settings in this file
3868 affect all users, whether they have ~/.mc/ini or not. Currently, only
3871 .\"Terminal databases"
3872 are loaded from mc.lib.
3876 User's own setup. If this file is present then the setup is loaded
3877 from here instead of the system\-wide startup file.
3879 .I @prefix@/share/mc/mc.hint
3881 This file contains the hints displayed by the program.
3883 .I @prefix@/share/mc/mc.menu
3885 This file contains the default system\-wide applications menu.
3889 User's own application menu. If this file is present it is used instead
3890 of the system\-wide applications menu.
3894 The directory list for the directory tree and tree view features.
3898 Local user\-defined menu. If this file is present, it is used instead of
3899 the home or system\-wide applications menu.
3902 This program is distributed under the terms of the GNU General Public
3903 License as published by the Free Software Foundation. See the built\-in
3904 help for details on the License and the lack of warranty.
3905 .\"NODE "AVAILABILITY"
3907 The latest version of this program can be found at
3908 ftp://ftp.gnu.org/gnu/mc/.
3911 ed(1), gpm(1), mcserv(8), terminfo(1), view(1), sh(1), bash(1),
3915 The Midnight Commander page on the World Wide Web:
3916 http://www.midnight\-commander.org/
3920 Authors and contributors are listed in the AUTHORS file in the source
3924 See the file TODO in the distribution for information on what remains to
3927 If you want to report a problem with the program, please send mail to
3928 this address: mc\-devel@gnome.org.
3930 Provide a detailed description of the bug, the version of the program
3933 displays this information), the operating system you are running the
3934 program on. If the program crashes, we would appreciate a stack trace.