[Contents] Topics:  DESCRIPTION DESCRIPTION  OPTIONS OPTIONS  Overview Overview  Mouse Support Mouse Support  Keys Keys  Miscellaneous Keys Miscellaneous Keys  Directory Panels Directory Panels  Shell Command Line Shell Command Line  General Movement Keys General Movement Keys  Input Line Keys Input Line Keys  Menu Bar Menu Bar  Left and Right Menus Left and Right Menus  Listing Mode... Listing Mode...  Sort Order... Sort Order...  Filter... Filter...  Reread Reread  File Menu File Menu  Quick cd Quick cd  Command Menu Command Menu  Directory Tree Directory Tree  Find File Find File  External panelize External panelize  Hotlist Hotlist  Extension File Edit Extension File Edit  Background jobs Background jobs  Menu File Edit Menu File Edit  Options Menu Options Menu  Configuration Configuration  Display bits Display bits  Confirmation Confirmation  Learn keys Learn keys  Virtual FS Virtual FS  Layout Layout  Save Setup Save Setup  Executing operating system commands Executing operating system commands  The cd internal command The cd internal command  Macro Substitution Macro Substitution  The subshell support The subshell support  Controlling Midnight Commander Controlling Midnight Commander  Chmod Chmod  Chown Chown  File Operations File Operations  Mask Copy/Rename Mask Copy/Rename  Internal File Viewer Internal File Viewer  Internal File Editor Internal File Editor  Completion Completion  Virtual File System Virtual File System  FTP File System FTP File System  Tar File System Tar File System  Network File System Network File System  Undelete File System Undelete File System  Colors Colors  Special Settings Special Settings  Terminal databases Terminal databases  FILES FILES  AVAILABILITY AVAILABILITY  SEE ALSO SEE ALSO  AUTHORS AUTHORS  BUGS BUGS  License License  QueryBox QueryBox  How to use help How to use help [DESCRIPTION] DESCRIPTION The Midnight Commander is a directory browser/file manager for Unix-like operating systems.[OPTIONS] OPTIONS "-a" Disables the usage of graphic characters for line drawing. "-b" Forces black and white display. "-c" Force color mode, please check the section ColorsColors for more information. "-C arg" Used to specify a different color set in the command line. The format of arg is documented in the ColorsColors section. "-d" Disables mouse support. "-f" Displays the compiled-in search paths for Midnight Commander files. "-k" Reset softkeys to their default from the termcap/terminfo database. Only useful on HP terminals when the function keys don't work. "-l file" Save the ftpfs dialog with the server in file. "-P" At program end, the Midnight Commander will print the last working directory; this, along with the shell function below, will allow you to browse through your directories and automatically move to the last directory you were in (thanks to Torben Fjerdingstad and Sergey for contributing this function and the code which implements this option). bash and zsh users: mc () { MC=/tmp/mc$$-"$RANDOM" /var/mc//bin/mc -P "$@" > "$MC" cd "`cat $MC`" rm "$MC" unset MC; } tcsh users: alias mc 'setenv MC `/var/mc//bin/mc -P \!*`; cd $MC; unsetenv MC' I know the bash function could be shorter for zsh and bash but the backquotes on bash won't accept your suspension the program with C-z. "-s" Turns on the slow terminal mode, in this mode the program will not draw expensive line drawing characters and will toggle verbose mode off. "-t" Used only if the code was compiled with Slang and terminfo: it makes the Midnight Commander use the value of the TERMCAP variable for the terminal information instead of the information on the system wide terminal database "-u" Disables the use of a concurrent shell (only makes sense if the Midnight Commander has been built with concurrent shell support). "-U" Enables the use of the concurrent shell support (only makes sense if the Midnight Commander was built with the subshell support set as an optional feature). "-v file" Enters the internal viewer to view the file specified. "-V" Displays the version of the program. "-x" Forces xterm mode. Used when running on xterm-capable terminals (two screen modes, and able to send mouse escape sequences). If specified, the first path name is the directory to show in the selected panel; the second path name is the directory to be shown in the other panel. [Overview] Overview The screen of the Midnight Commander is divided into four parts. Almost all of the screen space is taken up by two directory panels. By default, the second bottommost line of the screen is the shell command line, and the bottom line shows the function key labels. The topmost line is the menu bar line.Menu Bar The menu bar line may not be visible, but appears if you click the topmost line with the mouse or press the F9 key. The Midnight Commander provides a view of two directories at the same time. One of the panels is the current panel (a selection bar is in the current panel). Almost all operations take place on the current panel. Some file operations like Rename and Copy by default use the directory of the unselected panel as a destination (don't worry, they always ask you for confirmation first). For more information, see the sections on the Directory Panels,Directory Panels the Left and Right MenusLeft and Right Menus and the File Menu.File Menu You can execute system commands from the Midnight Commander by simply typing them. Everything you type will appear on the shell command line, and when you press Enter the Midnight Commander will execute the command line you typed; read the Shell Command LineShell Command Line and Input Line KeysInput Line Keys sections to learn more about the command line. [Mouse Support] Mouse Support The Midnight Commander comes with mouse support. It is activated whenever you are running on an xterm(1) terminal (it even works if you take a telnet or rlogin connection to another machine from the xterm) or if you are running on a Linux console and have the gpm mouse server running. When you left click on a file in the directory panels, that file is selected; if you click with the right button, the file is marked (or unmarked, depending on the previous state). Double-clicking on a file will try to execute the command if it is an executable program; and if the extension fileExtension File Edithas a program specified for the file's extension, the specified program is executed. Also, it is possible to execute the commands assigned to the function key labels by clicking on them. If a mouse button is clicked on the top frame line of the directory panel, it is scrolled one pageful backward. Correspondingly, a click on the bottom frame line will cause a scroll of one pageful forward. This frame line method works also in the Help ViewerHelp and the Directory Tree.Directory Tree The default auto repeat rate for the mouse buttons is 400 milliseconds. This may be changed to other values by editing the ~/.mc/iniSave Setup file and changing the mouse_repeat_rate parameter. If you are running the Commander with the mouse support, you can bypass the Commander and get the default mouse behavior (cutting and pasting text) by holding down the Shift key.[] [Keys] Keys Some commands in the Midnight Commander involve the use of the Control (sometimes labeled CTRL or CTL) and the Meta (sometimes labeled ALT or even Compose) keys. In this manual we will use the following abbreviations: C- means hold the Control key while typing the character . Thus C-f would be: hold the Control key and type f. M- means hold the Meta or Alt key down while typing . If there is no Meta or Alt key, type ESC, release it, then type the character . All input lines in the Midnight Commander use an approximation to the GNU Emacs editor's key bindings. There are many sections which tell about the keys. The following are the most important. The File MenuFile Menu section documents the keyboard shortcuts for the commands appearing in the File menu. This section includes the function keys. Most of these commands perform some action, usually on the selected file or the tagged files. The Directory PanelsDirectory Panels section documents the keys which select a file or tag files as a target for a later action (the action is usually one from the file menu). The Shell Command LineShell Command Line section list the keys which are used for entering and editing command lines. Most of these copy file names and such from the directory panels to the command line (to avoid excessive typing) or access the command line history. Input Line KeysInput Line Keys are used for editing input lines. This means both the command line and the input lines in the query dialogs. [Miscellaneous Keys] Miscellaneous Keys Here are some keys which don't fall into any of the other categories: Enter. If there is some text in the command line (the one at the bottom of the panels), then that command is executed. If there is no text in the command line then if the selection bar is over a directory the Midnight Commander does a chdir(2) to the selected directory and reloads the information on the panel; if the selection is an executable file then it is executed. Finally, if the extension of the selected file name matches one of the extensions in the extensions fileExtension File Edit then the corresponding command is executed. C-l. Repaint all the information in the Midnight Commander. C-x c. Run the ChmodChmod command on a file or on the tagged files. C-x o. Run the ChownChown command on the current file or on the tagged files. C-x l. Run the link command. C-x s. Run the symbolic link command. C-x i. Set the other panel display mode to information. C-x q. Set the other panel display mode to quick view. C-x !. Execute the External panelizeExternal panelize command. C-x h Run the add directory to hotlistHotlist command. M-!, Executes the Filtered view command, described in the view command.Internal File Viewer M-?, Executes the Find fileFind File command. M-c, Pops up the quick cdQuick cd dialog. C-o, When the program is being run in the Linux or SCO console or under an xterm, it will show you the output of the previous command. When ran on the Linux console, the Midnight Commander uses an external program (cons.saver) to handle saving and restoring of information on the screen. When the subshell support is compiled in, you can type C-o at any time and you will be taken back to the Midnight Commander main screen, to return to your application just type C-o. If you have an application suspended by using this trick, you won't be able to execute other programs from the Midnight Commander until you terminate the suspended application. [Directory Panels] Directory Panels This section lists the keys which operate on the directory panels. If you want to know how to change the appearance of the panels take a look at the section on Left and Right Menus.Left and Right Menus Tab, C-i. Change the current panel. The old other panel becomes the new current panel and the old current panel becomes the new other panel. The selection bar moves from the old current panel to the new current panel. Insert, C-t. To tag files you may use the Insert key (the kich1 terminfo sequence) or the C-t (Control-t) sequence. To untag files, just retag a tagged file. M-g, M-h (or M-r), M-j. Used to select the top file in a panel, the middle file and the bottom one, respectively. C-s, M-s. Start a filename search in the directory listing. When the search is active the keypresses will be added to the search string instead of the command line. If the "Show mini-status" option is enabled the search string is shown on the mini-status line. When typing, the selection bar will move to the next file starting with the typed letters. The "backspace" or DEL keys can be used to correct typing mistakes. If C-s is pressed again, the next match is searched for. M-t Toggle the current display listing to show the next display listing mode. With this it is possible to quickly switch from long listing to regular listing and the user defined listing mode. C-\\ (control-backslash). Show the directory hotlistHotlist and change to the selected directory. + (plus). This is used to select (tag) a group of files. The Midnight Commander will prompt for a regular expression describing the group. When Shell Patterns are enabled, the regular expression is much like the regular expressions in the shell (* standing for zero or more characters and ? standing for one character). If Shell Patterns is off, then the tagging of files is done with normal regular expressions (see ed (1)). If the expression starts or ends with a slash (/), then it will select directories instead of files. \\ (backslash). Use the "\" key to unselect a group of files. This is the opposite of the Plus key. up-key, C-p. Move the selection bar to the previous entry in the panel. down-key, C-n. Move the selection bar to the next entry in the panel. home, a1, M-<. Move the selection bar to the first entry in the panel. end, c1, M->. Move the selection bar to the last entry in the panel. next-page, C-v. Move the selection bar one page down. prev-page, M-v. Move the selection bar one page up. M-o, If the other panel is a listing panel and you are standing on a directory in the current panel, then the other panel contents are set to the contents of the currently selected directory (like Emacs' dired C-o key) otherwise the other panel contents are set to the parent dir of the current dir. C-PageUp, C-PageDown Only when ran on the Linux console: does a chdir to ".." and to the currently selected directory respectively. [Shell Command Line] Shell Command Line This section lists keys which are useful to avoid excessive typing when entering shell commands. M-Enter. Copy the currently selected file name to the command line. C-Enter. Same a M-Enter, this one only works on the Linux console. M-Tab. Does the filename, command, variable, username and hostname completionCompletion for you. C-x t, C-x C-t. Copy the tagged files (or if there are no tagged files, the selected file) of the current panel (C-x t) or of the other panel (C-x C-t) to the command line. C-x p, C-x C-p. The first key sequence copies the current path name to the command line, and the second one copies the unselected panel's path name to the command line. C-q. The quote command can be used to insert characters that are otherwise interpreted by the Midnight Commander (like the '+' symbol) M-p, M-n. Use these keys to browse through the command history. M-p takes you to the last entry, M-n takes you to the next one. M-h. Displays the history for the current input line. [General Movement Keys] General Movement Keys The help viewer, the file viewer and the directory tree use common code to handle moving. Therefore they accept exactly the same keys. Each of them also accepts some keys of its own. Other parts of the Midnight Commander use some of the same movement keys, so this section may be of use for those parts too. Up, C-p. Moves one line backward. Down, C-n. Moves one line forward. Prev Page, Page Up, M-v. Moves one pageful backward. Next Page, Page Down, C-v. Moves one pageful forward. Home, A1. Moves to the beginning. End, C1. Move to the end. The help viewer and the file viewer accept the following keys in addition the to ones mentioned above: b, C-b, C-h, Backspace, Delete. Moves one pageful backward. Space bar. Moves one pageful forward. u, d. Moves one half of a page backward or forward. g, G. Moves to the beginning or to the end. [Input Line Keys] Input Line Keys The input lines (they are used for the command lineShell Command Line and for the query dialogs in the program) accept these keys: C-a puts the cursor at the beginning of line. C-e puts the cursor at the end of the line. C-b, move-left move the cursor one position left. C-f, move-right move the cursor one position right. M-f moves one word forward. M-b moves one word backward. C-h, backspace delete the previous character. C-d, Delete delete the character in the point (over the cursor). C-@ sets the mark for cutting. C-w copies the text between the cursor and the mark to a kill buffer and removes the text from the input line. M-w copies the text between the cursor and the mark to a kill buffer. C-y yanks back the contents of the kill buffer. C-k kills the text from the cursor to the end of the line. M-p, M-n Use these keys to browse through the command history. M-p takes you to the last entry, M-n takes you to the next one. M-C-h, M-Backspace delete one word backward. M-Tab does the filename, command, variable, username and hostname completionCompletion for you. [] [Menu Bar] Menu Bar The menu bar pops up when you press F9 or click the mouse on the top row of the screen. The menu bar has five menus: "Left", "File", "Command", "Options" and "Right". The Left and Right MenusLeft and Right Menus allow you to modify the appearance of the left and right directory panels. The File MenuFile Menu lists the actions you can perform on the currently selected file or the tagged files. The Command MenuCommand Menu lists the actions which are more general and bear no relation to the currently selected file or the tagged files. [Left and Right Menus] Left and Right Menus The outlook of the directory panels can be changed from the "Left" and "Right" menus. [Listing Mode...] Listing Mode... The listing mode view is used to display a listing of files, there are four different listing modes available: Full, Brief, Long, and User. The full directory view shows the file name, the size of the file and the modification time. The brief view shows only the file name and it has two columns (therefore showing twice as many files as other views). The long view is similar to the output of "ls -l" command. The long view takes the whole screen width. If you choose the "User" display format, then you have to specify the display format. The user display format must start with a panel size specifier. This may be "half" or "full", and they specify a half screen panel and a full screen panel respectively. After the panel size, you may specify the two columns mode on the panel, this is done by adding the number "2" to the user format string. After this you add the name of the fields with an optional size specifier. This are the available fields you may display: name, displays the file name. size, displays the file size. bsize, is an alternative form of the