MC
MC
t Commander
GNU Midnigh
MC(1)
NAME
mc - Visual shell for Unix-like systems.
USAGE
mc [-abcCdfhPstuUVx] [-l log] [dir1 [dir2]] [-e [file] ...] [-v file]
DESCRIPTION
GNU Midnight Commander is a directory browser/file manager for Unix-like
operating systems.
OPTIONS
-a, --stickchars
Disable usage of graphic characters for line drawing.
-b, --nocolor
Force black and white display.
-c, --color
Force color mode, please check the section Colors for more informa
tion.
-C arg, --colors=arg
Specify a different color set in the command line. The format of
arg is documented in the Colors section.
--configure-options
Display configure options.
-d, --nomouse
Disable mouse support.
-D N, --debuglevel=N
Save the debug level for SMB VFS. N is in 0-10 range.
-e [file], --edit[=file]
Start the internal editor. If the file is specified, open it on s
tartup. See also mcedit (1).
-f, --datadir
Display the compiled-in search paths for Midnight Commander files.
-F, --datadir-info
Display extended info about compiled-in paths for Midnight Command
er.
-g, --oldmouse
Force a "normal tracking" mouse mode. Used when running on xterm-c
apable terminals (tmux/screen).
-k, --resetsoft
Reset softkeys to their default from the termcap/terminfo database
. Only useful on HP terminals when the function keys don't work.
-K file, --keymap=file
Specify a name of keymap file in the command line.
-l file, --ftplog=file
Save the ftpfs dialog with the server in file.
--nokeymap
Don't load key bindings from any file, use default hardcoded keys.
-P file, --printwd=file
Print the last working directory to the specified file. This op
tion is not meant to be used directly. Instead, it's used from a special shell
script that automatically changes the current directory of the she
ll to the last directory the Midnight Commander was in. Source the file
/usr/lib/mc/mc.sh (bash and zsh users) or /usr/lib/mc.csh (tcsh us
ers) respectively to define mc as an alias to the appropriate shell script.
-s, --slow
Set alternative mode drawing of frameworks. If the section [Line
s] is not filled, the symbol for the pseudographics frame is a space, otherwise
the frame characters are taken from follow params.
You can redefine the following variables:
lefttop
left-top corner
righttop
right-top corner
centertop
center-top cross
centerbottom
center-bottom cross
leftbottom
left-bottom corner
rightbottom
right-bottom corner
leftmiddle
left-middle cross
rightmiddle
right-middle cross
centermiddle
center cross
horiz default horizontal line
vert
thinhoriz
thin horizontal line
thinvert
thin vertical line
-S arg, --skin=arg
You can execute system commands from the Midnight Commander by simply typ
ing them. Everything you type will appear on the shell command line, and when
you press Enter the Midnight Commander will execute the command line yo
u typed; read the Shell Command Line and Input Line Keys sections to learn more
about the command line.
Mouse Support
The Midnight Commander comes with mouse support. It is activated wheneve
r you are running on an xterm(1) terminal (it even works if you take a telnet,
ssh 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 exe
cutable program; and if the extension file has 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.
The default auto repeat rate for the mouse buttons is 400 millisecond
s. This may be changed to other values by editing the ~/.config/mc/ini file and
changing the mouse_repeat_rate parameter.
If you are running the Midnight Commander with the mouse support, you can
get the default mouse behavior (cutting and pasting text) by holding down the
Shift key.
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 Com
pose) keys. In this manual we will use the following abbreviations:
C-<chr>
means hold the Control key while typing the character <chr>. Thus
C-f would be: hold the Control key and type f.
Alt-<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>.
S-<chr>
means hold the Shift key down while typing <chr>.
All input lines in the Midnight Commander use an approximation to the GNU
Emacs editor's key bindings (default).
You may redefine key bindings. See redefine hotkey bindings
for more info. All other key bindings (described in this manual) relative
to default behavior.
There are many sections which tell about the keys. The following are the
most important.
The File Menu section documents the keyboard shortcuts for the commands a
ppearing in the File menu. This section includes the function keys. Most of
these commands perform some action, usually on the selected file or the t
agged files.
The Directory Panels section documents the keys which select a file or ta
g files as a target for a later action (the action is usually one from the file
menu).
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 acces
s the command line history.
Input Line Keys are used for editing input lines. This means both the com
mand line and the input lines in the query dialogs.
Redefine hotkey bindings
Hotkey bindings may be read from external file (keymap-file). Initia
lly, Mignight Commander creates key bindings using keymap defined in the source
code. Then, two files /usr/share/mc/mc.keymap and /etc/mc/mc.keymap a
re loaded always, sequentially reassigned key bindings defined earlier.
User-defined keymap-file is searched on the following algorithm (to the f
irst one found):
1) command line option -K <keymap> or --keymap=<keymap>
2) Environment variable MC_KEYMAP
3) Parameter keymap in section [Midnight-Commander] of config file
.
4) File ~/.config/mc/mc.keymap
Command line option, environment variable and parameter in config file
may contain the absolute path to the keymap-file (with the extension .keymap or
without it). Search of keymap-file will occur in (to the first one found)
:
1) ~/.config/mc
2) /etc/mc/
3) /usr/share/mc/
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 o
f the panels), then that command is executed. If there is no text in the com
mand line then if the selection bar is over a directory the Midnig
ht Commander does a chdir(2) to the selected directory and reloads the informa
tion 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 file then the corresponding comma
nd is executed.
C-l
Quick search
The Quick search mode allows you to perform fast file search in file pane
l. Press C-s or Alt-s to start a filename search in the directory listing.
When the search is active, the user input will be added to the search str
ing 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 selectio
n 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 aga
in, the next match is searched for.
If quick search is started with double pressing of C-s, the previous quic
k search pattern will be used for current search.
Besides the filename characters, you can also use wildcard characters '*'
and '?'.
Shell Command Line
This section lists keys which are useful to avoid excessive typing when e
ntering shell commands.
Alt-Enter
copy the currently selected file name to the command line.
C-Enter
same a Alt-Enter. May not work on remote systems and some termina
ls.
C-Shift-Enter
copy the full path name of the currently selected file to the comm
and line. May not work on remote systems and some terminals.
Alt-Tab
does the filename, command, variable, username and hostname comple
tion for you.
C-x t, C-x C-t
copy the tagged files (or if there are no tagged files, the select
ed 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 comma
nd line, and the second one copies the unselected panel's path name to the com
mand line.
C-q
the quote command can be used to insert characters that are otherw
ise interpreted by the Midnight Commander (like the '+' symbol)
Alt-p, Alt-n
use these keys to browse through the command history. Alt-p takes
you to the last entry, Alt-n takes you to the next one.
Alt-h displays the history for the current input line.
General Movement Keys
The help viewer, the file viewer and the directory tree use common code t
o 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, Alt-v
moves one page up.
Next Page, Page Down, C-v
moves one page down.
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 page up.
Space bar
moves one page down.
u, d
g, G
C-e
C-b, move-left
move the cursor one position left.
C-f, move-right
move the cursor one position right.
Alt-f moves one word forward.
Alt-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-@
C-w
copies the text between the cursor and the mark to a kill buffer a
nd removes the text from the input line.
Alt-w copies the text between the cursor and the mark to a kill buffer.
C-y
C-k
kills the text from the cursor to the end of the line.
Alt-p, Alt-n
Use these keys to browse through the command history. Alt-p takes
you to the last entry, Alt-n takes you to the next one.
Alt-C-h, Alt-Backspace
delete one word backward.
Alt-Tab
does the filename, command, variable, username and hostname comple
tion for you.
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 Menus allow you to modify the appearance of the left a
nd right directory panels.
The File Menu lists the actions you can perform on the currently selected
file or the tagged files.
The Command Menu lists the actions which are more general and bear no rel
ation to the currently selected file or the tagged files.
The Options Menu lists the actions which allow you to customize the Midni
ght Commander.
Left and Right (Above and Below) Menus
The outlook of the directory panels can be changed from the Left and Righ
t menus (they are named Above and Below when the horizontal panel split is cho
sen from the Layout options dialog).
Listing Mode...
The listing mode view is used to display a listing of files, there ar
e 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 modifica
tion 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 dis
play 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
size
mode
nuid
To force one field to a fixed size (a size specifier), you just add : fol
lowed by the number of characters you want the field to have. If the number is
followed by the symbol +, then the size specifies the minimal field size
- if the program finds out that there is more space on the screen, it will then
expand that field.
For example, the Full display corresponds to this format:
half type name | size | mtime
And the Long display corresponds to this format:
full perm space nlink space owner space group space size space mtime spac
e name
This is a nice user display format:
half name | size:7 | type mode:3
Panels may also be set to the following modes:
Info The info view display information related to the currently selecte
d file and if possible information about the current file system.
Tree The tree view is quite similar to the directory tree feature. See
the section about it for more information.
Quick View
In this mode, the panel will switch to a reduced viewer that displ
ays the contents of the currently selected file, if you select the panel (with
the tab key or the mouse), you will have access to the usual viewe
r commands.
Sort Order...
The eight sort orders are by name, by extension, by modification time, by
access time, and by inode information modification time, by size, by inode and
unsorted. In the Sort order dialog box you can choose the sort order and
you may also specify if you want to sort in reverse order by checking the
reverse box.
By default directories are sorted before files but this can be changed fr
om the Panel options menu (option Mix all files).
Filter...
The filter command allows you to specify a shell pattern (for example
*.tar.gz) which the files must match to be shown. Regardless of the filter pat
tern, the directories and the links to directories are always shown in th
e directory panel.
Reread
The reread command reload the list of files in the directory. It is usefu
l if other processes have created or removed files.
File Menu
The Midnight Commander uses the F1 - F10 keys as keyboard shortcuts for c
ommands appearing in the file menu. The escape sequences for the function keys
are terminfo capabilities kf1 trough kf10. On terminals without funct
ion key support, you can achieve the same functionality by pressing the ESC key
and then a number in the range 1 through 9 and 0 (corresponding to F1 to
F9 and F10 respectively).
The File menu has the following commands (keyboard shortcuts in parenthes
es):
Help (F1)
Invokes the built-in hypertext help viewer. Inside the help viewer, you c
an use the Tab key to select the next link and the Enter key to follow that
link. The keys Space and Backspace are used to move forward and backward
in a help page. Press F1 again to get the full list of accepted keys.
Menu (F2)
Invoke the user menu. The user menu provides an easy way to provide user
s with a menu and add extra features to the Midnight Commander.
View (F3, F13)
View the currently selected file. By default this invokes the Internal F
ile Viewer but if the option "Use internal view" is off, it invokes an external
file viewer specified by the VIEWER environment variable. If VIEWER is u
ndefined, the PAGER environment variable is tried. If PAGER is also undefined,
the "view" command is invoked. If you use F13 instead, the viewer will b
e invoked without doing any formatting or preprocessing to the file.
See parameters for external viewer for explain how you may specify an ext
ended command line options for external viewers.
Filtered View (Alt-!)
This command prompts for a command and its arguments (the argument defau
lts to the currently selected file name), the output from such command is shown
in the internal file viewer.
Edit (F4, F14)
Press F4 to edit the highlighted file. Press F14 (usually F14) to start
the editor with a new, empty file. Currently they invoke the vi editor, or the
editor specified in the EDITOR environment variable, or the Internal File
Editor if the use_internal_edit option is on.
See parameters for external editor for explain how you may specify an ext
ended command line options for external editors.
Copy (F5, F15)
Press F5 to pop up an input dialog to copy the currently selected
file (or the tagged files, if there is at least one file tagged) to the direc
tory/filename you specify in the input dialog. The destination defaults t
o the directory in the non-selected panel. Space for destination file may be
preallocated relative to preallocate_space configure option. During th
is process, you can press C-c or ESC to abort the operation. For details about
source mask (which will be usually either * or ^\(.*\)$ depending on sett
ing of Use shell patterns) and possible wildcards in the destination see Mask
copy/rename.
F15 (usually F15) is similar, but defaults to the directory in the se
lected panel. It always operates on the selected file, regardless of any tagged
files.
On some systems, it is possible to do the copy in the background by click
ing on the background button (or pressing Alt-b in the dialog box). The Back
ground Jobs is used to control the background process.
Link (C-x l)
Create a hard link to the current file.
Absolute symlink (C-x s)
Create a absolute symbolic link to the current file.
ze.
The "External panelize" allows you to execute an external program, and ma
ke the output of that program the contents of the current panel.
The "Command history" command shows a list of typed commands. The selecte
d command is copied to the command line. The command history can also be
accessed by typing Alt-p or Alt-n.
The "Directory hotlist" command makes changing of the current directory t
o often used directories faster.
The "Screen list" command shows a dialog window with the list of cur
rently running internal editors, viewers and other MC modules that support this
mode.
The "Edit extension file" command allows you to specify programs to execu
ted when you try to execute, view, edit and do a bunch of other thing on files
with certain extensions (filename endings).
The "Edit Menu File" command may be used for editing the user menu (which
appears by pressing F2).
Directory Tree
The Directory Tree command shows a tree figure of the directories. You c
an select a directory from the figure and the Midnight Commander will change to
that directory.
There are two ways to invoke the tree. The real directory tree command is
available from Commands menu. The other way is to select tree view from the
Left or Right menu.
To get rid of long delays the Midnight Commander creates the tree figure
by scanning only a small subset of all the directories. If the directory which
you want to see is missing, move to its parent directory and press C-r (o
r F2).
You can use the following keys:
General movement keys are accepted.
Enter. In the directory tree, exits the directory tree and changes to th
is directory in the current panel. In the tree view, changes to this directory
in the other panel and stays in tree view mode in the current panel.
C-r, F2 (Rescan). Rescan this directory. Use this when the tree figure
is out of date: it is missing subdirectories or shows some subdirectories which
don't exist any more.
F3 (Forget). Delete this directory from the tree figure. Use this to rem
ove clutter from the figure. If you want the directory back to the tree figure
press F2 in its parent directory.
F4 (Static/Dynamic). Toggle between the dynamic navigation mode (default
) and the static navigation mode.
In the static navigation mode you can use the Up and Down keys to select
a directory. All known directories are shown.
In the dynamic navigation mode you can use the Up and Down keys to se
lect a sibling directory, the Left key to move to the parent directory, and the
Right key to move to a child directory. Only the parent, sibling and chil
dren directories are shown, others are left out. The tree figure changes dynam
ically as you traverse.
F5 (Copy). Copy the directory.
F6 (RenMov). Move the directory.
F7 (Mkdir). Make a new directory below this directory.
F8 (Delete). Delete this directory from the file system.
C-s, Alt-s. Search the next directory matching the search string. If the
re is no such directory these keys will move one line down.
C-h, Backspace. Delete the last character of the search string.
Any other character. Add the character to the search string and move
to the next directory which starts with these characters. In the tree view you
must first activate the search mode by pressing C-s. The search string is
shown in the mini status line.
The following actions are available only in the directory tree. They aren
't supported in the tree view.
F1 (Help). Invoke the help viewer and show this section.
Esc, F10. Exit the directory tree. Do not change the directory.
The mouse is supported. A double-click behaves like Enter. See also the s
ection on mouse support.
Find File
The Find File feature first asks for the start directory for the search a
nd the filename to be searched for. By pressing the Tree button you can select
the start directory from the directory tree figure.
Option form whole words. Like grep -w.
You can start the search by pressing the OK button. During the search yo
u can stop from the Stop button and continue from the Start button.
You can browse the filelist with the up and down arrow keys. The Chdi
r button will change to the directory of the currently selected file. The Again
button will ask for the parameters for a new search. The Quit button quit
s the search operation. The Panelize button will place the found files to the
current directory panel so that you can do additional operations on t
hem (view, copy, move, delete and so on). After panelizing you can press C-r to
return to the normal file listing.
The 'Enable ignore directories' checkbox and input field below it allow t
o set up the list of directories that should be skip during the search files
(for example, you may want to avoid searches on a CD-ROM or on a NFS d
irectory that is mounted across a slow link). List components must be separated
with a colon, here is an example:
/cdrom:/nfs/wuarchive:/afs
Relative paths are supported also. The following example shows how to ski
the f
Open
(to a
with
Rules are matched from top to bottom, thus the order is important. If t
he appropriate action is missing, search continues as if this rule didn't match
(i.e. if a file matches the first and second entry and View action is mis
sing in the first one, then on pressing F3 the View action from the second
entry will be used). default should match all the actions.
Background Jobs
This lets you control the state of any background Midnight Commander pr
ocess (only copy and move files operations can be done in the background). You
can stop, restart and kill a background job from here.
Edit Menu File
The user menu is a menu of useful actions that can be customized by the u
ser. When you access the user menu, the file .mc.menu from the current direc
tory is used if it exists, but only if it is owned by user or root and i
s not world-writable. If no such file found, ~/.config/mc/menu is tried in the
same way, and otherwise mc uses the default system-wide menu /usr/share/m
c/mc.menu.
The format of the menu file is very simple. Lines that start with anythin
g but space or tab are considered entries for the menu (in order to be able to
use it like a hot key, the first character should be a letter). All th
e lines that start with a space or a tab are the commands that will be executed
when the entry is selected.
When an option is selected all the command lines of the option are copied
to a temporary file in the temporary directory (usually /usr/tmp) and then
that file is executed. This allows the user to put normal shell construct
s in the menus. Also simple macro substitution takes place before executing the
menu code. For more information, see macro substitution.
Here is a sample mc.menu file:
A
Read mail
emacs -f rmail
= <sub-cond>
= <sub-cond> | <sub-cond> ...
= <sub-cond> & <sub-cond> ...
<pattern>
<pattern>
<pattern>
<pattern>
<type>
<type>
<filename>
<sub-cond>
n
r
d
l
c
b
f
s
x
t
not a directory
regular file
directory
link
character device
block device
FIFO (pipe)
socket
executable file
tagged
For example 'rlf' means either regular file, link or fifo. The 't' type i
s a little special because it acts on the panel instead of the file. The condi
tion '=t t' is true if there are tagged files in the current panel and fa
lse if not.
If the condition starts with '=?' instead of '=' a debug trace will be sh
own whenever the value of the condition is calculated.
The conditions are calculated from left to right. This means
= f *.tar.gz | f *.tgz & t n
is calculated as
( (f *.tar.gz) | (f *.tgz) ) & (t n)
Here is a sample of the use of conditions:
= f *.tar.gz | f *.tgz & t n
L
List the contents of a compressed tar-archive
gzip -cd %f | tar xvf Addition Conditions
If the condition begins with '+' (or '+?') instead of '=' (or '=?
') it is an addition condition. If the condition is true the menu entry will be
included in the menu. If the condition is false the menu entry will not b
e included in the menu.
You can combine default and addition conditions by starting
h '+=' or '=+' (or '+=?' or '=+?' if you want debug trace). If you
two different conditions, one for adding and another for
ou can precede a menu entry with two condition lines, one starting
another starting with '='.
condition wit
want to use
defaulting, y
with '+' and
Comments are started with '#'. The additional comment lines must start wi
th '#', space or tab.
Options Menu
The Midnight Commander has some options that may be toggled on and off in
several dialogs which are accessible from this menu. Options are enabled if
they have an asterisk or "x" in front of them.
The Configuration command pops up a dialog from which you can change most
of settings of the Midnight Commander.
The Layout command pops up a dialog from which you specify a bunch of opt
ions how mc looks like on the screen.
The Panel options command pops up a dialog from which you specify options
of file manager panels.
The Confirmation command pops up a dialog from which you specify which ac
tions you want to confirm.
The Appearance command pops up a dialog from which you specify the skin.
The Display bits command pops up a dialog from which you may select which
characters is your terminal able to display.
The Learn keys command pops up a dialog from which you test some keys whi
ch are not working on some terminals and you may fix them.
The Virtual FS command pops up a dialog from which you specify some VFS r
elated options.
The Save setup command saves the current settings of the Left, Right and
Options menus. A small number of other settings is saved, too.
Configuration
The options in this dialog are divided into several groups: "File operati
on options", "Esc key mode", "Pause after run" and "Other options".
File operation options
Verbose operation. This toggles whether the file Copy, Rename and Delete
operations are verbose (i.e., display a dialog box for each operation). If you
have a slow terminal, you may wish to disable the verbose operation. It i
s automatically turned off if the speed of your terminal is less than 9600 bps.
Compute totals. If this option is enabled, the Midnight Commander comput
es total byte sizes and total number of files prior to any Copy, Rename and
Delete operations. This will provide you with a more accurate progress ba
r at the expense of some speed. This option has no effect, if Verbose operation
is disabled.
Classic progressbar. If this option is enabled, the progressbar of Copy/
Move/Delete operations is always grown form left to right. If disabled, the
growing direction of progressbar follows to direction of Copy/Move/Delete
operation: from left panel to right one and vice versa. Enabled by default.
Mkdir autoname. When you press F7 to create a new directory, the in
put line in popup dialog will be filled by name of current file or directory in
active panel. Disabled by default.
Preallocate space. Preallocate space for whole target file, if possible,
before copy operation. Disabled by default.
Esc key mode.
By default the Midnight Commander treats the ESC key as a key prefix. Th
erefore, you should press Esc code twice to exit a dialog. But there is a pos
sibility to use a single press of ESC key for that action.
Single press. By default this option is disabled. If you'll enable
it, the ESC key will act as a prefix key for set up time interval (see Timeout
option below), and if no extra keys have arrived, then the ESC key is int
erpreted as a cancel key (ESC ESC).
Timeout. This options is used to setup the time interval (in microsecond
s) for single press of ESC key. By default, this inrerval is one second
(1000000 microseconds). Also the timeout can be set via KEYBOARD_KEY_TI
behavior of
structure,
move you to
the link
Mouse page scrolling. Controls whenever scrolling with the mouse wheel i
s done by pages or line by line on the panels.
File highlight
You can specify whether permissions and file types should be highlighted
with distinctive Colors. If the permission highlighting is enabled, the parts
of the perm and mode display fields which apply to the user running Mid
night Commander are highlighted with the color defined by the selected keyword.
If the file type highlighting is enabled, file names are colored accordin
g to rules described in /etc/mc/filehighlight.ini file. See Filenames Highlight
for more info.
Quick search
You can specify how the Quick search mode should works: case insensitiv
ely, case sensitively or be matched to the the panel sort order: case sensitive
or not.
Confirmation
In this dialog you configure the confirmation options for file deletion,
overwriting files, execution by pressing enter, quitting the program, directory
hotlist entries deletion and history cleanup.
Appearance
In this dialog you can select the skin to be used.
See the Skins section for technical details about the skin definition fil
es.
Display bits
This is used to configure the range of visible characters on the screen.
This setting may be 7-bits if your terminal/curses supports only seven output
bits, ISO-8859-1 displays all the characters in the ISO-8859-1 map and fu
ll 8 bits is for those terminals that can display full 8 bit characters.
Learn keys
This dialog allows you to test and redefine functional keys, cursor arrow
s and some other keys to make them work properly on your terminal. They often
don't, since many terminal databases are incomplete or broken.
You can move around with the Tab key and with the vi moving keys ('h' lef
t, 'j' down, 'k' up and 'l' right). Once you press any cursor movement key and
it is recognized, you can use that key as well.
You can test keys just by pressing each of them. When you press a key an
d it is recognized properly, OK should appear next to the name of that key.
Once a key is marked OK it starts working as usually, e.g. F1 pressed th
e first time will just check that the F1 key works, but after that it will show
help. The same applies to the arrow keys. The Tab key should be working
always.
If some keys do not work properly then you won't see OK appear after pres
sing one of these. Then you may want to redefine it. Do it by pressing the
button with the name of that key (either by the mouse or by Enter or
Space after selecting the button with Tab or arrows). Then a message box will
appear asking you to press that key. Do it and wait until the message bo
x disappears. If you want to abort, just press Escape once and wait.
When you finish with all the keys, you can Save them. The definitions fo
r the keys you have redefined will be written into the [terminal:TERM] section
of your ~/.config/mc/ini file (where TERM is the name of your current ter
minal). The definitions of the keys that were already working properly are not
saved.
Virtual FS
This option gives you control over the settings of the Virtual File Syste
m.
The Midnight Commander keeps in memory the information related to some of
the virtual file systems to speed up the access to the files in the file sys
tem (for example, directory listings fetched from FTP servers).
Also, in order to access the contents of compressed files (for example
, compressed tar files) the Midnight Commander needs to create temporary uncom
pressed files on your disk.
Since both the information in memory and the temporary files on disk take
up resources, you may want to tune the parameters of the cached information to
decrease your resource usage or to maximize the speed of access to freque
ntly used file systems.
Because of the format of the tar archives, the Tar filesystem needs to re
ad the whole file just to load the file entries. Since most tar files are usu
ally kept compressed (plain tar files are species in extinction), the tar
file system has to uncompress the file on the disk in a temporary location and
then access the uncompressed file as a regular tar file.
Now, since we all love to browse files and tar files all over the disk
, it's common that you will leave a tar file and then re-enter it later. Since
decompression is slow, the Midnight Commander will cache the information
in memory for a limited time. When the timeout expires, all the resources
associated with the file system are released. The default timeout is set
to one minute.
The FTP File System (ftpfs) allows you to browse directories on remote FT
P servers. It has several options.
ftp anonymous password is the password used when you login as "anonymous
". Some sites require a valid e-mail address. On the other hand, you probably
don't want to give your real e-mail address to untrusted sites, especiall
y if you are not using spam filtering.
ftpfs keeps the directory listing it fetches from a FTP server in a cache
. The cache expire time is configurable with the ftpfs directory cache timeout
option. A low value for this option may slow down every operation
on the ftpfs because every operation would require sending a request to the FTP
server.
You can define an FTP proxy host for doing FTP. Note that most modern fi
rewalls are fully transparent at least for passive FTP (see below), so FTP
proxies are considered obsolete.
If Always use ftp proxy is not set, you can use the exclamation sign to e
nable proxy for certain hosts. See FTP File System for examples.
If this option is set, the program will do two things: consult the /usr
/lib/mc/mc.no_proxy file for lines containing host names that are local (if the
host name starts with a dot, it is assumed to be a domain) and to assume
that any hostnames without dots in their names are directly accessible. All
infor
load
/usr/
uses
The Save Setup command creates the ~/.config/mc/ini file by saving the cu
rrent settings of the Left, Right and Options menus.
If you activate the auto save setup option, MC will always save the curre
nt settings when exiting.
There also exist settings which can't be changed from the menus. To chang
e these settings you have to edit the setup file with your favorite editor. See
the section on Special Settings for more information.
Executing operating system commands
You may execute commands by typing them directly in the Midnight Commande
r's input line, or by selecting the program you want to execute with the selec
tion bar in one of the panels and hitting Enter.
If you press Enter over a file that is not executable, the Midnight Co
mmander checks the extension of the selected file against the extensions in the
Extensions File. If a match is found then the code associated with that
extension is executed. A very simple macro expansion takes place before execut
ing the command.
The cd internal command
The cd command is interpreted by the Midnight Commander, it is not pas
sed to the command shell for execution. Thus it may not handle all of the nice
macro expansion and substitution that your shell does, although it does s
ome of them:
Tilde substitution. The (~) will be substituted with your home directory
, if you append a username after the tilde, then it will be substituted with
the login directory of the specified user.
For example, ~guest is the home directory for the user guest, while ~/gue
st is the directory guest in your home directory.
Previous directory. You can jump to the directory you were previously by
using the special directory name '-' like this: cd CDPATH directories. If the directory specified to the cd command is
not in the current directory, then The Midnight Commander uses the value in the
environment variable CDPATH to search for the directory in any of the nam
ed directories.
Macro Substitution
When accessing a user menu, or executing an extension dependent command
, or running a command from the command line input, a simple macro substitution
takes place.
The macros are:
%i
The indent of blank space, equal the cursor column position. For
edit menu only.
%y
%k
%e
%m
%f and %p
The current file name.
%x
%b
%d
%F
%D
%t
%T
%u and %U
Similar to the %t and %T macros, but in addition the files are unt
agged. You can use this macro only once per menu file entry or extension file
entry, because next time there will be no tagged files.
%s and %S
The selected files: The tagged files if there are any. Otherwise t
he current file.
%cd
This is a special macro that is used to change the current dir
ectory to the directory specified in front of it. This is used primarily as an
interface to the Virtual File System.
%view This macro is used to invoke the internal viewer. This macro can
be used alone, or with arguments. If you pass any arguments to this macro,
they should be enclosed in brackets.
The arguments are: ascii to force the viewer into ascii mode;
hex to force the viewer into hex mode; nroff to tell the viewer that it should
The % character
%{some text}
Prompt for the substitution. An input box is shown and the text in
side the braces is used as a prompt. The macro is substituted by the text typed
by the user. The user can press ESC or F10 to cancel. This macro d
oesn't work on the command line yet.
%var{ENV:default}
If environment variable ENV is unset, the default is substituted.
Otherwise, the value of ENV is substituted.
The subshell support
The subshell support is a compile time option, that works with the shells
: bash, tcsh and zsh.
When the subshell code is activated the Midnight Commander will spawn a c
oncurrent copy of your shell (the one defined in the SHELL variable and if it
is not defined, then the one in the /etc/passwd file) and run it in a ps
eudo terminal, instead of invoking a new shell each time you execute a command,
the command will be passed to the subshell as if you had typed it. This
also allows you to change the environment variables, use shell functions and
define aliases that are valid until you quit the Midnight Commander.
If you are using bash you can specify startup commands for the
subshell in your ~/.local/share/mc/bashrc file and special keyboard maps in the
~/.local/share/mc/inputrc file. tcsh users may specify startup commands
in the ~/.local/share/mc/tcshrc file.
When the subshell code is used, you can suspend applications at any time
with the sequence C-o and jump back to the Midnight Commander, if you interrupt
an application, you will not be able to run other external commands until
you quit the application you interrupted.
An extra added feature of using the subshell is that the prompt display
ed by the Midnight Commander is the same prompt that you are currently using in
your shell.
The OPTIONS section has more information on how you can control the subsh
ell code.
Chmod
The Chmod window is used to change the attribute bits in a group of files
and directories. It can be invoked with the C-x c key combination.
The Chmod window has two parts - Permissions and File.
In the File section are displayed the name of the file or directory and i
ts permissions in octal form, as well as its owner and group.
In the Permissions section there is a set of check buttons which correspo
nd to the file attribute bits. As you change the attribute bits, you can see
the octal value change in the File section.
To move between the widgets (buttons and check buttons) use the arrow key
s or the Tab key. To change the state of the check buttons or to select a but
ton use Space. You can also use the hotkeys on the buttons to quickly ac
tivate them. Hotkeys are shown as highlighted letters on the buttons.
To set the attribute bits, use the Enter key.
When working with a group of files or directories, you just click on the
bits you want to set or clear. Once you have selected the bits you want to
change, you select one of the action buttons (Set marked or Clear marked)
.
Finally, to set the attributes exactly to those specified, you can use th
e [Set all] button, which will act on all the tagged files.
[Marked all] set only marked attributes to all selected files
[Set marked] set marked bits in attributes of all selected files
[Clean marked] clear marked bits in attributes of all selected files
[Set] set the attributes of one file
[Cancel] cancel the Chmod command
Chown
The Chown command is used to change the owner/group of a file. The hot ke
y for this command is C-x o.
Advanced Chown
The Advanced Chown command is the Chmod and Chown command combined into o
ne window. You can change the permissions and owner/group of files at once.
File Operations
When you copy, move or delete files the Midnight Commander shows the fi
le operations dialog. It shows the files currently being processed and uses up
to three progress bars. The file bar indicates the percentage of the cur
rent file that has been processed so far. The count bar shows how many of the
tagged files have been handled. The bytes bar indicates the percenta
ge of the total size of the tagged files that has been handled. If the verbose
option is off, the file and bytes bars are not shown.
There are two buttons at the bottom of the dialog. Pressing the Skip butt
on will skip the rest of the current file. Pressing the Abort button will abort
the whole operation, the rest of the files are skipped.
There are three other dialogs which you can run into during the file oper
ations.
The error dialog informs about error conditions and has three choices.
Normally you select either the Skip button to skip the file or the Abort button
to abort the operation altogether. You can also select the Retry button
if you fixed the problem from another terminal.
The replace dialog is shown when you attempt to copy or move a file on th
e top of an existing file. The dialog shows the dates and sizes of the both
files. Press the Yes button to overwrite the file, the No button to ski
p the file, the All button to overwrite all the files, the None button to never
overwrite and the Update button to overwrite if the source file is newer
than the target file. You can abort the whole operation by pressing the Abort
button.
The recursive delete dialog is shown when you try to delete a directory
which is not empty. Press the Yes button to delete the directory recursively,
the No button to skip the directory, the All button to delete all the dir
ectories and the None button to skip all the non-empty directories. You can
abort the whole operation by pressing the Abort button. If you selected
the Yes or All button you will be asked for a confirmation. Type "yes" only if
you are really sure you want to do the recursive delete.
If you have tagged files and perform an operation on them only the files
on which the operation succeeded are untagged. Failed and skipped files are
left tagged.
Mask Copy/Rename
The copy/move operations let you translate the names of files in an easy
way. To do it, you have to specify the correct source mask and usually in the
trailing part of the destination specify some wildcards. All the files m
atching the source mask are copied/renamed according to the target mask. If
there are tagged files, only the tagged files matching the source mask ar
e renamed.
There are other options which you can set:
Follow links
determines whether make the symlinks and hardlinks in the source directo
ry (recursively in subdirectories) new links in the target directory or whether
would you like to copy their content.
Dive into subdirs
determines the behavior when the source directory is about to be copied,
but the target directory already exists. The default action is to copy the
contents of the source directory into the target directory. Enabling thi
s option causes copying the source directory itself into the target directory.
For example, you want to copy directory /foo containing file bar to /bla
/foo, which is an already existing directory. Normally (when Dive into subdirs
is not set), mc would copy file /foo/bar into the file /bla/foo/bar. By
enabling this option the /bla/foo/foo directory will be created, and /foo/bar
will be copied into /bla/foo/foo/bar.
Preserve attributes
determines whether to preserve the permissions, timestamps and (if you
are root) the ownership of the original files. If this option is not set, the
current value of the umask will be respected.
Use shell patterns
When this option is on you can use the '*' and '?' wildcards in the sourc
e mask. They work like they do in the shell. In the target mask only the '*'
and '\<digit>' wildcards are allowed. The first '*' wildcard in the tar
get mask corresponds to the first wildcard group in the source mask, the second
'*' corresponds to the second group and so on. The '\1' wildcard corresp
onds to the first wildcard group in the source mask, the '\2' wildcard corre
sponds to the second group and so on all the way up to '\9'. The '\0' wi
ldcard is the whole filename of the source file.
Two examples:
checkbox is on, the regular expression is much like the filename globbing
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 don
e with normal regular expressions (see ed (1)). When Case sensitive checkbox is
on, the selection will be case sensitive characters. If Case sensitive i
s off, the case will be ignored.
Internal Diff Viewer
The mcdiff is a visual diff tool. You can compare two files and edit them
in-place (diffs are updated dynamically). You can browse and view a working
copy from popular version control systems (GIT, Subversion, etc).
Following shortcuts are available in internal diff viewer of Midnight Com
mander.
F1 Invoke the built-in hypertext help viewer.
F2 Save modified files.
F4 Edit file of the left panel in the internal editor.
F14 Edit file of the right panel in the internal editor.
F5 Merge the current hunk. Only the current hunk will be merged.
F7 Start search.
F17 Continue search.
F10, Esc, q Exit from diff viewer.
Alt-s, s Toggle show of hunk status.
Alt-n, l Toggle show of line numbers.
f Maximize left panel.
= Make panels equal in width.
> Reduce the size of the right panel.
< Reduce the size of the left panel.
c Toggle show of trailing carriage return (CR) symbol as ^M.
2, 3, 4, 8 Set tabulation size
C-u Swap contents of diff panels.
C-r Refresh the screen.
C-o Switch to the subshell and show the command screen.
Enter, Space, n Find next diff hunk.
Backspace, p Find previous diff hunk.
g Go to line.
Down Scroll one line forward.
ton label, since on the button is the mode which you enter by that key.
F9 Toggle the format/unformat mode: when format mode is on the viewer wil
l interpret some string sequences to show bold and underline with different
colors. Also, on button label is the other mode than current.
F10, Esc. Exit the internal file viewer.
next-page, space, C-v. Scroll one page forward.
prev-page, Alt-v, C-b, Backspace. Scroll one page backward.
down-key Scroll one line forward.
up-key Scroll one line backward.
C-l Refresh the screen.
C-o Switch to the subshell and show the command screen.
[n] m Set the mark n.
[n] r Jump to the mark n.
C-f Jump to the next file.
C-b Jump to the previous file.
Alt-r Toggle the ruler.
Alt-e to change charset of displayed text may use M-e (Alt-e). Recoding
is made from selected codepage into system codepage. To cancel the recoding you
may select "<No translation>" in charset selection dialog.
It's possible to instruct the file viewer how to display a file, look at
the Edit Extension File section
Internal File Editor
The internal file editor is a full-featured full screen editor. It can e
dit files up to 64 megabytes. It is possible to edit binary files. The inter
nal file editor is invoked using F4 if the use_internal_edit option is se
t in the initialization file.
The features it presently supports are: block copy, move, delete, cut, pa
ste; key for key undo; pull-down menus; file insertion; macro commands; regular
expression search and replace; shift-arrow text highlighting (if supporte
d by the terminal); insert-overwrite toggle; word wrap; autoindent; tunable tab
size; syntax highlighting for various file types; and an option to pipe t
ext blocks through shell commands like indent and ispell.
Sections:
Options of editor in ini-file
The editor is very easy to use and requires no tutoring. To see what k
eys do what, just consult the appropriate pull-down menu. Other keys are: Shift
movement keys do text highlighting. Ctrl-Ins copies to the file mcedit.c
lip and Shift-Ins pastes from mcedit.clip. Shift-Del cuts to mcedit.clip, and
Ctrl-Del deletes highlighted text. Mouse highlighting also works, and y
ou can override the mouse as usual by holding down the shift key while dragging
the mouse to let normal terminal mouse highlighting work.
To define a macro, press Ctrl-R and then type out the key strokes you wan
t to be executed. Press Ctrl-R again when finished. You can then assign the
macro to any key you like by pressing that key. The macro is executed whe
n you press Ctrl-A and then the assigned key. The macro is also executed if you
press Meta, Ctrl, or Esc and the assigned key, provided that the key is n
ot used for any other function. Once defined, the macro commands go into the
file ~/.local/share/mc/mcedit/mcedit.macros You can delete a macro by del
eting the appropriate line in this file.
To change charset of displayed text may use M-e (Alt-e). Recoding is m
ade from selected codepage into system codepage. To cancel the recoding you may
select "<No translation>" in charset selection dialog.
F19 will format the currently highlighted block (plain text or C or C++ c
ode or another). This is controlled by the file /usr/share/mc/edit.indent.rc
which is copied to ~/.local/share/mc/mcedit/edit.indent.rc in your home d
irectory the first time you use it.
The editor also displays non-us characters (160+). When editing bina
ry files, you should set display bits to 7 bits in the options menu to keep the
spacing clean.
Options of editor in ini-file
Some editor options of ini-file are described in this section. Options a
re placed in [Midnight-Commander] section
editor_wordcompletion_collect_entire_file
Search autocomplete candidates in entire of file or just from begi
n of file to cursor position (0)
Screen selector
Midnight Commander supports running many internal modules (such as editor
, viewer and diff viewer) simultaneously and switching between them without
closing open files. Using several file managers at a time, however, is no
t currently supported.
Let's call each of these modules a screen. There are three ways to switch
between screens, using one of these global shortcuts:
Alt-} switch to the next screen;
Alt-{ switch to the previous screen;
Alt-` open a dialog window with the list of currently open screens (or u
se the "Screen list" menu item).
Completion
Let the Midnight Commander type for you.
Attempt to perform completion on the text before current position. MC
attempts completion treating the text as variable (if the text begins with $),
username (if the text begins with ~), hostname (if the text begins with @
) or command (if you are on the command line in the position where you might
type a command, possible completions then include shell reserved words an
d shell built-in commands as well) in turn. If none of these matches, filename
completion is attempted.
Filename, username, variable and hostname completion works on all input l
ines, command completion is command line specific. If the completion is
ambiguous (there are more different possibilities), MC beeps and the
following action depends on the setting of the Complete: show all option in the
Configuration dialog. If it is enabled, a list of all possibilities pops
up next to the current position and you can select with the arrow keys and
Enter the correct entry. You can also type the first letters in which th
e possibilities differ to move to a subset of all possibilities and complete as
much as possible. If you press Alt-Tab again, only the subset will be sh
own in the listbox, otherwise the first item which matches all the previous
characters will be highlighted. As soon as there is no ambiguity, dialo
g disappears, but you can hide it by canceling keys Esc, F10 and left and right
arrow keys. If Complete: show all is disabled, the dialog pops up only if
you press Alt-Tab for the second time, for the first time MC just beeps.
Apply escaping of ?, * and & symbols (as \?, \*, \& ) in filenames to dis
allow use them as metasymbols in regular expressions when substitution is per
formed in the input line.
Virtual File System
The Midnight Commander is provided with a code layer to access the file s
ystem; this code layer is known as the virtual file system switch. The virtual
file system switch allows the Midnight Commander to manipulate files not
located on the Unix file system.
Currently the Midnight Commander is packaged with some Virtual File Syste
ms (VFS): the local file system, used for accessing the regular Unix file sys
tem; the ftpfs, used to manipulate files on remote systems with th
e FTP protocol; the tarfs, used to manipulate tar and compressed tar files; the
undelfs, used to recover deleted files on ext2 file systems (the default
file system for Linux systems), fish (for manipulating files over shell connec
tions such as rsh and ssh). If the code was compiled with sftpfs (for
manipulating files over SFTP connections). If the code was compiled with smbfs
support, you can manipulate files on remote systems with the SMB (CIFS) p
rotocol.
A generic extfs (EXTernal virtual File System) is provided in order to ea
sily expand VFS capabilities using scripts and external software.
The VFS switch code will interpret all of the path names used and will fo
rward them to the correct file system, the formats used for each one of the
file systems is described later in their own section.
FTP File System
The FTP File System (ftpfs) allows you to manipulate files on rem
ote machines. To actually use it, you can use the FTP link item in the menu or
directly change your current directory using the cd command to a path nam
e that looks like this:
ftp://[!][user[:pass]@]machine[:port][remote-dir]
The user, port and remote-dir elements are optional. If you specify the
user element, the Midnight Commander will login to the remote machine as that
user, otherwise it will use anonymous login or the login name from the
~/.netrc file. The optional pass element is the password used for the connec
tion. Using the password in the VFS directory name is not recommended, b
ecause it can appear on the screen in clear text and can be saved to the direc
tory history.
To enable using FTP proxy, prepend ! (an exclamation sign) to the hostna
me.
Examples:
ftp://ftp.nuclecu.unam.mx/linux/local
ftp://tsx-11.mit.edu/pub/linux/packages
ftp://!behind.firewall.edu/pub
ftp://guest@remote-host.com:40/pub
ftp://miguel:xxx@server/pub
Please check the Virtual File System dialog box for ftpfs options.
Tar File System
The tar file system provides you with read-only access to your tar files
and compressed tar files by using the chdir command. To change your directory
to a tar file, you change your current directory to the tar file by using
the following syntax:
/filename.tar/utar://[dir-inside-tar]
The mc.ext file already provides a shortcut for tar files, this means tha
t usually you just point to a tar file and press return to enter into the tar
file, see the Edit Extension File section for details on how this is done
.
Examples:
mc-3.0.tar.gz/utar://mc-3.0/vfs
/ftp/GCC/gcc-2.7.0.tar/utar://
The latter specifies the full path of the tar archive.
FIle transfer over SHell filesystem
The fish file system is a network based file system that allows you to m
anipulate the files in a remote machine as if they were local. To use this, the
other side has to either run fish server, or has to have bash-compatible
shell.
To connect to a remote machine, you just need to chdir into a special dir
ectory which name is in the following format:
sh://[user@]machine[:options]/[remote-dir]
The user, options and remote-dir elements are optional. If you specify t
he user element, the Midnight Commander will try to login on the remote machine
as that user, otherwise it will use your login name.
The available options are:
'C' - use compression;
'r' - use rsh instead of ssh;
port - specify the port used by remote server.
If the remote-dir element is present, your current directory on the remot
e machine will be set to this one.
Examples:
sh://onlyrsh.mx:r/linux/local
sh://joe@want.compression.edu:C/private
sh://joe@noncompressed.ssh.edu/private
sh://joe@somehost.ssh.edu:2222/private
SFTP (SSH File Transfer Protocol) filesystem
The SFTP file system is a network based file system that allows you to ma
nipulate the files in a remote machine as if they were local.
To connect to a remote machine, you just need to chdir into a special dir
ectory which name is in the following format:
sftp://[user@]machine:[port]/[remote-dir]
The user, port and remote-dir elements are optional. If you specify the
user element, the Midnight Commander will try to login on the remote machine as
that user, otherwise it will use your login name. port - specify the por
t used by remote server (22 by default). If the remote-dir element is present,
your current directory on the remote machine will be set to this one.
Examples:
sftp://onlyrsh.mx/linux/local
sftp://joe:password@want.compression.edu/private
sftp://joe@noncompressed.ssh.edu/private
sftp://joe@somehost.ssh.edu:2222/private
Undelete File System
On Linux systems, if you asked configure to use the ext2fs undelete fac
ilities, you will have the undelete file system available. Recovery of deleted
files is only available on ext2 file systems. The undelete file system i
s just an interface to the ext2fs library to retrieve all of the deleted files
names on an ext2fs and provides and to extract the selected files into a
regular partition.
To use this file system, you have to chdir into the special file name
formed by the "undel://" prefix and the file name where the actual file system
resides.
For example, to recover deleted files on the second partition of the firs
t SCSI disk on Linux, you would use the following path name:
undel://sda2
It may take a while for the undelfs to load the required information befo
re you start browsing files there.
SMB File System
The smbfs allows you to manipulate files on remote machines with SMB (or
CIFS) protocol. These include Windows for Workgroups, Windows 9x/ME/XP, Win
dows NT, Windows 2000 and Samba. To actually use it, you may try t
o use the panel command "SMB link..." (accessible from the menubar) or you may
directly change your current directory to it using the cd command to a pa
th name that looks like this:
smb://[user@]machine[/service][/remote-dir]
The user, service and remote-dir elements are optional. The user, domain
and password can be specified in an input dialog.
Examples:
smb://machine/Share
smb://other_machine
smb://guest@machine/Public/Irlex
EXTernal File System
extfs allows you to integrate numerous features and file types into GNU M
idnight Commander in an easy way, by writing scripts.
Extfs filesystems can be divided into two categories:
1. Stand-alone filesystems, which are not associated with any existing fi
le. They represent certain system-wide data as a directory tree. You can
invoke them by typing 'cd fsname://' where fsname is an extfs short name
(see below). Examples of such filesystems include audio (list audio tracks on
the CD) or apt (list of all Debian packages in the system).
For example, to list CD-Audio tracks on your CD-ROM drive, type
cd audio://
2. 'Archive' filesystems (like rpm, patchfs and more), which represent co
ntents of a file as a directory tree. It can consist of 'real' files com
pressed in an archive (urar, rpm) or virtual files, like messages i
n a mailbox (mailfs) or parts of a patch (patchfs). To access such filesystems
'fsname://' should be appended to the archive name. Note that the archiv
e itself can be on another vfs.
For example, to list contents of a zip archive documents.zip type
cd documents.zip/uzip://
In many aspects, you could treat extfs like any other directory. For ins
tance, you can add it to the hotlist or change to it from directory history.
An important limitation is that you cannot invoke shell commands inside e
xtfs, just like any other non-local VFS.
Common extfs scripts included with Midnight Commander are:
a
apt
deb
dpkg
hp48
lslR
//).
mailfs mbox-style mailbox files support (cd mailbox/mailfs://).
patchfs
rpms
inputmark
color of input selected text
inputunhanged
color of input text before first modification or cursor movement
commandlinemark
color of selected text in command line
reverse
reverse color
Section [dialog] describes the elements that are placed on dialog windows
(except error dialogs).
_default_
Default color for this section. Used [core]._default_ if not speci
fied
dfocus Color of active element (in focus)
dhotnormal
Color of hotkeys
dhotfocus
Color of hotkeys in focused element
Section [error] describes the elements that are placed on error dialog wi
ndows
_default_
Default color for this section. Used [core]._default_ if not speci
fied
errdhotnormal
Color of hotkeys
errdhotfocus
Color of hotkeys in focused element
Section [menu] describes the elements that are placed in menu. This secti
on describes system menu (called by F9) and user-defined menus (called by F2 in
panels and by F11 in editor).
_default_
Default color for this section. Used [core]._default_ if not speci
fied
entry Color of menu items
menuhot
Color of menu hotkeys
menusel
Color of active menu item (in focus)
menuhotsel
[core]
# green on black
_default_=green;black
# green (default) on blue
selected=;blue
# yellow on black (default)
# underlined yellow on black (default)
marked=yellow;;underline
Possible colors (names) and attributes are described in Colors. section.
Draw lines
Lines sets in section [Lines] into skin-file. By default single lines are
used, but you may redefine to usage of any utf-8 symbols (like to lines, for
example).
WARNING!!! When you build Midnight Commander with the Ncurses screen li
brary usage of drawing lines is limited! Possible only drawing a single lines.
For all questions and comments please contact the developers of Ncurses.
Descriptions of parameters [Lines]:
lefttop
left-top line fragment.
righttop
right-top line fragment.
centertop
down branch of horizontal line
centerbottom
up branch of horizontal line
leftbottom
left-bottom line fragment
rightbottom
right-bottom line fragment
leftmiddle
right branch of vertical line
rightmiddle
left branch of vertical line
centermiddle
cross of lines
horiz horizontal line
vert
vertical line
thinhoriz
thin horizontal line
thinvert
Compatibility
Appointment of color by skin-files fully compatible with the appointment
of the colors described in Colors. section.
In this case, reassignment of colors has priority over the skin file and
is complementary.
Filenames Highlight
Section [filehighlight] in current skin-file contains key names as highli
ght groups and values as color pairs. Color pairs is documented in Skins sec
tion.
Rules of filenames highlight are placed in /usr/share/mc/filehighlight.i
ni file (~/.config/mc/filehighlight.ini). Name of section in this file must be
equal to parameters names in [filehighlight] section (in current skin-fil
e).
Keys in these groups are:
type
to the top line unless it is already on the top line, in this case it will go
to the first file in the panel.
The end key has a similar behavior: Go down to the middle line, if
over it; else go to the bottom line unless you already are at the bottom line,
in such case it will move the selection to the last file name in t
he panel.
use_file_to_guess_type
If this variable is on (the default) it will spawn the file comman
d to match the file types listed on the mc.ext file.
xtree_mode
If this variable is on (default is off) when you browse the file s
ystem on a Tree panel, it will automatically reload the other panel with the
contents of the selected directory.
fish_directory_timeout
This variable holds the lifetime of a directory cache entry in sec
onds. The default value is 900 seconds.
clipboard_store
This variable contains path (with options) to the external clipboa
rd utility like 'xclip' to read text into X selection from file. For example:
clipboard_store=xclip -i
clipboard_paste
This variable contains path (with options) to the external clipboa
rd utility like 'xclip' to print the selection to standard out. For example:
clipboard_paste=xclip -o
autodetect_codeset
This option allows use the `enca' command to autodetect codeset
of text files in internal viewer and editor. List of valid values can be obtain
by the `enca --list languages | cut -d : -f1' command. Option must
be located in the [Misc] section.
For example:
autodetect_codeset=russian
Parameters for external editor or viewer
The Midnight Commander provides a way for specify an options for external
editors and viewers. The Midnight Commander tries to search the "[External
editor or viewer parameters]" section in the system initialization file
(the mc.lib file located in the Midnight Commander library directory) and then
in the ~/.config/mc/ini file. The option name should be equal to the name
(full pathname) of external editor or viewer. The option value can contain
following variables:
%filename
The filename to edit/view.
%lineno
The start line in the opening file.
For example:
FILES
Full paths below may vary between installations. They are also affected
by the MC_DATADIR environment variable. If it's set, its value is used instead
of /usr/share/mc in the paths below.
/usr/share/mc/mc.hlp
The help file for the program.
/usr/share/mc/mc.ext
The default system-wide extensions file.
~/.config/mc/mc.ext
User's own extension, view configuration and edit configuration fi
le. They override the contents of the system wide files if present.
/usr/share/mc/mc.ini
The default system-wide setup for the Midnight Commander, used onl
y if the user doesn't have his own ~/.config/mc/ini file.
/usr/share/mc/mc.lib
Global settings for the Midnight Commander. Settings in this file
affect all users, whether they have ~/.config/mc/ini or not. Currently, only
terminal settings are loaded from mc.lib.
~/.config/mc/ini
User's own setup. If this file is present then the setup is loaded
from here instead of the system-wide startup file.
/usr/share/mc/mc.hint
This file contains the hints displayed by the program.
/usr/share/mc/mc.menu
This file contains the default system-wide applications menu.
~/.config/mc/menu
User's own application menu. If this file is present it is used in
stead of the system-wide applications menu.
~/.cache/mc/Tree
The directory list for the directory tree and tree view features.
~/.local/share/mc.menu
Local user-defined menu. If this file is present, it is used inste
ad of the home or system-wide applications menu.
To change default root directory of MC, you can use MC_HOME environment
variable. The value of MC_HOME must be an absolute path. If MC_HOME is unset or
MC Version 4.8.13
er 2014
Septemb
MC(1)