<!--#exec cmd="header mc" -->
<ul>
</ul><H2>NAME </H2><ul>
mc - Visual shell for Unix-like systems.
</ul><H2>USAGE </H2><ul>
<b>mc</b>
[-abcCdfhPstuUVx?] [-l log] [dir1 [dir2]] [-v file]
</ul><H2>DESCRIPTION </H2><ul>
<p>
The Midnight Commander is a directory browser/file manager for
Unix-like operating systems.
</ul><H2>OPTIONS </H2><ul>
<p><dl compact><dt><i>-a</i>
<dd>Disables the usage of graphic characters for line drawing.
<dt><i>-b</i>
<dd>Forces black and white display.
<dt><i>-c</i>
<dd>Force color mode, please check the section
Colors
for more information.
<dt><i>-C arg</i>
<dd>Used to specify a different color set in the command line. The format
of arg is documented in the
Colors
section.
<dt><i>-d</i>
<dd>Disables mouse support.
<dt><i>-f</i>
<dd>Displays the compiled-in search paths for Midnight Commander files.
<dt><i>-k</i>
<dd>Reset softkeys to their default from the termcap/terminfo
database. Only useful on HP terminals when the function keys don't work.
<dt><i>-l file</i>
<dd>Save the ftpfs dialog with the server in file.
<dt><i>-P</i>
<dd>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).
<pre>
<p><br>bash and zsh users:
<br>
<p><br>mc ()
<br>{
<br> MC=/tmp/mc$$-"$RANDOM"
<br> /usr/bin/mc -P "$@" > "$MC"
<br> cd "`cat $MC`"
<br> rm "$MC"
<br> unset MC;
<br>}
<br>
<p><br>tcsh users:
<br>alias mc 'setenv MC `/usr/bin/mc -P !*`; cd $MC; unsetenv MC'
<br></pre>
<dt>I know the bash function could be shorter for zsh and bash but the
<dd>backquotes on bash won't accept your suspension the program with
C-z.
<dt><i>-s</i>
<dd>Turns on the slow terminal mode, in this mode the program will not
draw expensive line drawing characters and will toggle verbose mode
off.
<dt><i>-t</i>
<dd>Used only if the code was compiled with Slang and terminfo: it makes
the Midnight Commander use the value of the
<b>TERMCAP</b>
variable for the terminal information instead of the information on
the system wide terminal database
<dt><i>-u</i>
<dd>Disables the use of a concurrent shell (only makes sense if the
Midnight Commander has been built with concurrent shell support).
<dt><i>-U</i>
<dd>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).
<dt><i>-v file</i>
<dd>Enters the internal viewer to view the file specified.
<dt><i>-V</i>
<dd>Displays the version of the program.
<dt><i>-x</i>
<dd>Forces xterm mode. Used when running on xterm-capable terminals (two
screen modes, and able to send mouse escape sequences).
</dl>
<p>
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.
<p>
</ul><H2>Overview </H2><ul>
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.
The menu bar line may not be visible, but appears if you click the
topmost line with the mouse or press the F9 key.
<p>
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,
the
Left and Right Menus
and the
File Menu.
<p>
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 Line
and
Input Line Keys
sections to learn more about the command line.
<p>
</ul><H2>Mouse Support </H2><ul>
The Midnight Commander comes with mouse support. It is activated
whenever you are running on an
<b>xterm(1)</b>
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
<b>gpm</b>
mouse server running.
<p>
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).
<p>
Double-clicking on a file will try to execute the command if it is
an executable program; and if the
extension file
has a program specified for the file's extension, the specified
program is executed.
<p>
Also, it is possible to execute the commands assigned to the function
key labels by clicking on them.
<p>
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 Viewer
and the
Directory Tree.
<p>
The default auto repeat rate for the mouse buttons is 400
milliseconds. This may be changed to other values by editing the
~/.mc/ini
file and changing the
<i>mouse_repeat_rate</i>
parameter.
<p>
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.
</ul><H2> </H2><ul>
</ul><H2>Keys </H2><ul>
Some commands in the Midnight Commander involve the use of the
<i>Control</i>
(sometimes labeled CTRL or CTL) and the
<i>Meta</i>
(sometimes labeled ALT or even Compose) keys. In this manual we will
use the following abbreviations:
<p>
C-<chr> means hold the Control key while typing the character
<chr>. Thus C-f would be: hold the Control key and type f.
<p>
M-<chr> means hold the Meta or Alt key down while typing <chr>. If
there is no Meta or Alt key, type ESC, release it, then type the
character <chr>.
<p>
All input lines in the Midnight Commander use an approximation to
the GNU Emacs editor's key bindings.
<p>
There are many sections which tell about the keys. The following are
the most important.
<p>
The
File 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.
<p>
The
Directory 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).
<p>
The
Shell 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.
<p>
Input Line Keys
are used for editing input lines. This means both the command line and
the input lines in the query dialogs.
<p>
</ul><H2> Miscellaneous Keys </H2><ul>
Here are some keys which don't fall into any of the other categories:
<p>
<b>Enter.</b>
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