mc.1.in 102 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337
  1. .\"TOPICS "Topics:"
  2. .TH MC 1 "September 2007" "MC Version 4.6.2-pre1" "GNU Midnight Commander"
  3. .\"SKIP_SECTION"
  4. .SH "NAME"
  5. mc \- Visual shell for Unix-like systems.
  6. .\"SKIP_SECTION"
  7. .SH "USAGE"
  8. .B mc
  9. [\-abcCdfhPstuUVx] [\-l log] [dir1 [dir2]] [-e [file]] [-v file]
  10. .\"NODE "DESCRIPTION"
  11. .SH "DESCRIPTION"
  12. GNU Midnight Commander is a directory browser/file manager for
  13. Unix-like operating systems.
  14. .\"NODE "OPTIONS"
  15. .\".\"DONT_SPLIT"
  16. .SH "OPTIONS"
  17. .TP
  18. .I \-a, \-\-stickchars
  19. Disable usage of graphic characters for line drawing.
  20. .TP
  21. .I \-b, \-\-nocolor
  22. Force black and white display.
  23. .TP
  24. .I \-c, \-\-color
  25. Force color mode, please check the section
  26. .\"LINK2"
  27. Colors
  28. .\"Colors"
  29. for more information.
  30. .TP
  31. .I \-C arg, \-\-colors=arg
  32. Specify a different color set in the command line. The format of arg is
  33. documented in the
  34. .\"LINK2"
  35. Colors
  36. .\"Colors"
  37. section.
  38. .TP
  39. .I \-d, \-\-nomouse
  40. Disable mouse support.
  41. .TP
  42. .I \-e [file], \-\-edit[=file]
  43. Start the internal editor. If the file is specified, open it on
  44. startup. See also
  45. .BR "mcedit (1)" .
  46. .TP
  47. .I \-f, \-\-datadir
  48. Display the compiled-in search paths for Midnight Commander files.
  49. .TP
  50. .I \-k, \-\-resetsoft
  51. Reset softkeys to their default from the termcap/terminfo
  52. database. Only useful on HP terminals when the function keys don't work.
  53. .TP
  54. .I \-l file, \-\-ftplog=file
  55. Save the ftpfs dialog with the server in file.
  56. .TP
  57. .I \-P file, \-\-printwd=file
  58. Print the last working directory to the specified file. This option is
  59. not meant to be used directly. Instead, it's used from a special shell
  60. script that automatically changes the current directory of the shell to
  61. the last directory the Midnight Commander was in. Source the file
  62. .B @prefix@/share/mc/bin/mc.sh
  63. (bash and zsh users) or
  64. .B @prefix@/share/mc/bin/mc.csh
  65. (tcsh users) respectively to define
  66. .B mc
  67. as an alias to the appropriate shell script.
  68. .TP
  69. .I \-s, \-\-slow
  70. Turn on the slow terminal mode, in this mode the program will not
  71. draw expensive line drawing characters and will toggle verbose mode
  72. off.
  73. .TP
  74. .I \-t, \-\-termcap
  75. Used only if the code was compiled with Slang and terminfo: it makes
  76. the Midnight Commander use the value of the
  77. .B TERMCAP
  78. variable for the terminal information instead of the information on
  79. the system wide terminal database
  80. .TP
  81. .I \-u, \-\-nosubshell
  82. Disable use of the concurrent shell (only makes sense if the Midnight
  83. Commander has been built with concurrent shell support).
  84. .TP
  85. .I \-U, \-\-subshell
  86. Enable use of the concurrent shell support (only makes sense if the
  87. Midnight Commander was built with the subshell support set as an
  88. optional feature).
  89. .TP
  90. .I \-v file, \-\-view=file
  91. Start the internal viewer to view the specified file. See also
  92. .BR "mcview (1)" .
  93. .TP
  94. .I \-V, \-\-version
  95. Display the version of the program.
  96. .TP
  97. .I \-x, \-\-xterm
  98. Force xterm mode. Used when running on xterm-capable terminals (two
  99. screen modes, and able to send mouse escape sequences).
  100. .PP
  101. If specified, the first path name is the directory to show in the
  102. selected panel; the second path name is the directory to be shown in
  103. the other panel.
  104. .\"NODE "Overview"
  105. .SH "Overview"
  106. The screen of the Midnight Commander is divided into four parts.
  107. Almost all of the screen space is taken up by two directory panels.
  108. By default, the second line from the bottom of the screen is the
  109. shell command line, and the bottom line shows the function key labels.
  110. The topmost line is the
  111. .\"LINK2"
  112. menu bar line\&.
  113. .\"Menu Bar"
  114. The menu bar line may not be visible, but appears if you click the
  115. topmost line with the mouse or press the F9 key.
  116. .PP
  117. The Midnight Commander provides a view of two directories at the same
  118. time. One of the panels is the current panel (a selection bar is in
  119. the current panel). Almost all operations take place on the current
  120. panel. Some file operations like Rename and Copy by default use the
  121. directory of the unselected panel as a destination (don't worry, they
  122. always ask you for confirmation first). For more information, see the
  123. sections on the
  124. .\"LINK2"
  125. Directory Panels\&,
  126. .\"Directory Panels"
  127. the
  128. .\"LINK2"
  129. Left and Right Menus
  130. .\"Left and Right Menus"
  131. and the
  132. .\"LINK2"
  133. File Menu\&.
  134. .\"File Menu"
  135. .PP
  136. You can execute system commands from the Midnight Commander by simply
  137. typing them. Everything you type will appear on the shell command line,
  138. and when you press Enter the Midnight Commander will execute the
  139. command line you typed; read the
  140. .\"LINK2"
  141. Shell Command Line
  142. .\"Shell Command Line"
  143. and
  144. .\"LINK2"
  145. Input Line Keys
  146. .\"Input Line Keys"
  147. sections to learn more about the command line.
  148. .\"NODE "Mouse Support"
  149. .SH "Mouse Support"
  150. The Midnight Commander comes with mouse support. It is activated
  151. whenever you are running on an
  152. .B xterm(1)
  153. terminal (it even works if you take a telnet, ssh or rlogin connection to
  154. another machine from the xterm) or if you are running on a Linux
  155. console and have the
  156. .B gpm
  157. mouse server running.
  158. .PP
  159. When you left click on a file in the directory panels, that file is
  160. selected; if you click with the right button, the file is marked (or
  161. unmarked, depending on the previous state).
  162. .PP
  163. Double-clicking on a file will try to execute the command if it is
  164. an executable program; and if the
  165. .\"LINK2"
  166. extension file
  167. .\"Extension File Edit"
  168. has a program specified for the file's extension, the specified
  169. program is executed.
  170. .PP
  171. Also, it is possible to execute the commands assigned to the function
  172. key labels by clicking on them.
  173. .PP
  174. If a mouse button is clicked on the top frame line of the directory panel,
  175. it is scrolled one page up. Likewise, a click on the bottom frame line
  176. will cause scrolling one page down. This frame line method works also
  177. in the
  178. .\"LINK2"
  179. Help Viewer
  180. .\"Contents"
  181. and the
  182. .\"LINK2"
  183. Directory Tree\&.
  184. .\"Directory Tree"
  185. .PP
  186. The default auto repeat rate for the mouse buttons is 400
  187. milliseconds. This may be changed to other values by editing the
  188. .\"LINK2"
  189. \&~/.mc/ini
  190. .\"Save Setup"
  191. file and changing the
  192. .I mouse_repeat_rate
  193. parameter.
  194. .PP
  195. If you are running the Midnight Commander with the mouse support, you
  196. can get the default mouse behavior (cutting and pasting text) by holding
  197. down the Shift key.
  198. .SH ""
  199. .\"NODE "Keys"
  200. .SH "Keys"
  201. Some commands in the Midnight Commander involve the use of the
  202. .I Control
  203. (sometimes labeled CTRL or CTL) and the
  204. .I Meta
  205. (sometimes labeled ALT or even Compose) keys. In this manual we will
  206. use the following abbreviations:
  207. .TP
  208. .B C-<chr>
  209. means hold the Control key while typing the character <chr>.
  210. Thus C-f would be: hold the Control key and type f.
  211. .TP
  212. .B Alt-<chr>
  213. means hold the Meta or Alt key down while typing <chr>.
  214. If there is no Meta or Alt key, type
  215. .IR ESC ,
  216. release it, then type the character <chr>.
  217. .TP
  218. .B S-<chr>
  219. means hold the Shift key down while typing <chr>.
  220. .PP
  221. All input lines in the Midnight Commander use an approximation to
  222. the GNU Emacs editor's key bindings.
  223. .PP
  224. There are many sections which tell about the keys. The following are
  225. the most important.
  226. .PP
  227. The
  228. .\"LINK2"
  229. File Menu
  230. .\"File Menu"
  231. section documents the keyboard shortcuts for the commands appearing in
  232. the File menu. This section includes the function keys. Most of these
  233. commands perform some action, usually on the selected file or the
  234. tagged files.
  235. .PP
  236. The
  237. .\"LINK2"
  238. Directory Panels
  239. .\"Directory Panels"
  240. section documents the keys which select a file or tag files as a
  241. target for a later action (the action is usually one from the file
  242. menu).
  243. .PP
  244. The
  245. .\"LINK2"
  246. Shell Command Line
  247. .\"Shell Command Line"
  248. section list the keys which are used for entering and editing command
  249. lines. Most of these copy file names and such from the directory
  250. panels to the command line (to avoid excessive typing) or access the
  251. command line history.
  252. .PP
  253. .\"LINK2"
  254. Input Line Keys
  255. .\"Input Line Keys"
  256. are used for editing input lines. This means both the command line and
  257. the input lines in the query dialogs.
  258. .\"NODE " Miscellaneous Keys"
  259. .SH " Miscellaneous Keys"
  260. Here are some keys which don't fall into any of the other categories:
  261. .TP
  262. .B Enter
  263. if there is some text in the command line (the one at the bottom of
  264. the panels), then that command is executed. If there is no text in the
  265. command line then if the selection bar is over a directory the
  266. Midnight Commander does a
  267. .B chdir(2)
  268. to the selected directory and reloads the information on the panel;
  269. if the selection is an executable file then it is executed. Finally,
  270. if the extension of the selected file name matches one of the
  271. extensions in the
  272. .\"LINK2"
  273. extensions file
  274. .\"Extension File Edit"
  275. then the corresponding command is executed.
  276. .TP
  277. .B C-l
  278. repaint all the information in the Midnight Commander.
  279. .TP
  280. .B C-x c
  281. run the
  282. .\"LINK2"
  283. Chmod
  284. .\"Chmod"
  285. command on a file or on the tagged files.
  286. .TP
  287. .B C-x o
  288. run the
  289. .\"LINK2"
  290. Chown
  291. .\"Chown"
  292. command on the current file or on the tagged files.
  293. .TP
  294. .B C-x l
  295. run the link command.
  296. .TP
  297. .B C-x s
  298. run the symbolic link command.
  299. .TP
  300. .B C-x i
  301. set the other panel display mode to information.
  302. .TP
  303. .B C-x q
  304. set the other panel display mode to quick view.
  305. .TP
  306. .B C-x !
  307. execute the
  308. .\"LINK2"
  309. External panelize
  310. .\"External panelize"
  311. command.
  312. .TP
  313. .B C-x h
  314. run the
  315. .\"LINK2"
  316. add directory to hotlist
  317. .\"Hotlist"
  318. command.
  319. .TP
  320. .B Alt-!
  321. executes the Filtered view command, described in the
  322. .\"LINK2"
  323. view command\&.
  324. .\"Internal File Viewer"
  325. .TP
  326. .B Alt-?
  327. executes the
  328. .\"LINK2"
  329. Find file
  330. .\"Find File"
  331. command.
  332. .TP
  333. .B Alt-c
  334. pops up the
  335. .\"LINK2"
  336. quick cd
  337. .\"Quick cd"
  338. dialog.
  339. .TP
  340. .B C-o
  341. when the program is being run in the Linux or FreeBSD console or under
  342. an xterm, it will show you the output of the previous command. When ran
  343. on the Linux console, the Midnight Commander uses an external program
  344. (cons.saver) to handle saving and restoring of information on the
  345. screen.
  346. .PP
  347. When the subshell support is compiled in, you can type C-o at any time
  348. and you will be taken back to the Midnight Commander main screen, to
  349. return to your application just type C-o. If you have an application
  350. suspended by using this trick, you won't be able to execute other
  351. programs from the Midnight Commander until you terminate the suspended
  352. application.
  353. .\"NODE " Directory Panels"
  354. .SH " Directory Panels"
  355. This section lists the keys which operate on the directory panels. If
  356. you want to know how to change the appearance of the panels take a
  357. look at the section on
  358. .\"LINK2"
  359. Left and Right Menus\&.
  360. .\"Left and Right Menus"
  361. .TP
  362. .B Tab, C-i
  363. change the current panel. The old other panel becomes the new current
  364. panel and the old current panel becomes the new other panel. The
  365. selection bar moves from the old current panel to the new current
  366. panel.
  367. .TP
  368. .B Insert, C-t
  369. to tag files you may use the Insert key (the kich1 terminfo sequence)
  370. or the C-t (Control-t) sequence. To untag files, just retag a tagged
  371. file.
  372. .TP
  373. .B Alt-g, Alt-r, Alt-j
  374. used to select the top file in a panel, the middle file and the bottom one,
  375. respectively.
  376. .TP
  377. .B C-s, Alt-s
  378. start a filename search in the directory listing. When the search is
  379. active, the user input will be added to the search string instead of
  380. the command line. If the
  381. .I Show mini-status
  382. option is enabled the search string is shown on the mini-status
  383. line. When typing, the selection bar will move to the next file
  384. starting with the typed letters. The
  385. .I backspace
  386. or
  387. .I DEL
  388. keys can be used to correct typing mistakes. If C-s is pressed
  389. again, the next match is searched for.
  390. .TP
  391. .B Alt-t
  392. toggle the current display listing to show the next display listing
  393. mode.
  394. With this it is possible to quickly switch to brief listing, long
  395. listing, user defined listing mode, and back to the default.
  396. .TP
  397. .B C-\\\\ (control-backslash)
  398. show the
  399. .\"LINK2"
  400. directory hotlist
  401. .\"Hotlist"
  402. and change to the selected directory.
  403. .TP
  404. .B + \ (plus)
  405. this is used to select (tag) a group of files. The Midnight Commander
  406. will prompt for a regular expression describing the group. When
  407. .I Shell Patterns
  408. are enabled, the regular expression is much like the regular
  409. expressions in the shell (* standing for zero or more characters and ?
  410. standing for one character). If
  411. .I Shell Patterns
  412. is off, then the tagging of files is done with normal regular
  413. expressions (see ed (1)).
  414. .PP
  415. If the expression starts or ends with a slash (/), then it will select
  416. directories instead of files.
  417. .TP
  418. .B \\\\ (backslash)
  419. use the "\\" key to unselect a group of files. This is the opposite of
  420. the Plus key.
  421. .TP
  422. .B up-key, C-p
  423. move the selection bar to the previous entry in the panel.
  424. .TP
  425. .B down-key, C-n
  426. move the selection bar to the next entry in the panel.
  427. .TP
  428. .B home, a1, Alt-<
  429. move the selection bar to the first entry in the panel.
  430. .TP
  431. .B end, c1, Alt->
  432. move the selection bar to the last entry in the panel.
  433. .TP
  434. .B next-page, C-v
  435. move the selection bar one page down.
  436. .TP
  437. .B prev-page, Alt-v
  438. move the selection bar one page up.
  439. .TP
  440. .B Alt-o
  441. If the currently selected file is a directory, load that directory on
  442. the other panel and moves the selection to the next file.
  443. .TP
  444. .B Alt-i
  445. make the current directory of the current panel also the current
  446. directory of the other panel. Put the other panel to the listing mode
  447. if needed. If the current panel is panelized, the other panel doesn't
  448. become panelized.
  449. .TP
  450. .B C-PageUp, C-PageDown
  451. only when supported by the terminal: change to ".." and to the currently
  452. selected directory respectively.
  453. .TP
  454. .B Alt-y
  455. moves to the previous directory in the history, equivalent to clicking
  456. the
  457. .I <
  458. with the mouse.
  459. .TP
  460. .B Alt-u
  461. moves to the next directory in the history, equivalent to clicking the
  462. .I >
  463. with the mouse.
  464. .TP
  465. .B Alt-Shift-h, Alt-H
  466. displays the directory history, equivalent to depressing the 'v' with
  467. the mouse.
  468. .\"NODE " Shell Command Line"
  469. .SH " Shell Command Line"
  470. This section lists keys which are useful to avoid excessive typing when
  471. entering shell commands.
  472. .TP
  473. .B Alt-Enter
  474. copy the currently selected file name to the command line.
  475. .TP
  476. .B C-Enter
  477. same a Alt-Enter. May not work on remote systems and some terminals.
  478. .TP
  479. .B C-Shift-Enter
  480. copy the full path name of the currently selected file to the command
  481. line. May not work on remote systems and some terminals.
  482. .TP
  483. .B Alt-Tab
  484. does the filename, command, variable, username and hostname
  485. .\"LINK2"
  486. completion
  487. .\"Completion"
  488. for you.
  489. .TP
  490. .B C-x t, C-x C-t
  491. copy the tagged files (or if there are no tagged files, the selected
  492. file) of the current panel (C-x t) or of the other panel (C-x C-t) to
  493. the command line.
  494. .TP
  495. .B C-x p, C-x C-p
  496. the first key sequence copies the current path name to the command
  497. line, and the second one copies the unselected panel's path name to
  498. the command line.
  499. .TP
  500. .B C-q
  501. the quote command can be used to insert characters that are otherwise
  502. interpreted by the Midnight Commander (like the '+' symbol)
  503. .TP
  504. .B Alt-p, Alt-n
  505. use these keys to browse through the command history. Alt-p takes you
  506. to the last entry, Alt-n takes you to the next one.
  507. .TP
  508. .B Alt-h
  509. displays the history for the current input line.
  510. .\"NODE " General Movement Keys"
  511. .SH " General Movement Keys"
  512. The help viewer, the file viewer and the directory tree use common
  513. code to handle moving. Therefore they accept exactly the same
  514. keys. Each of them also accepts some keys of its own.
  515. .PP
  516. Other parts of the Midnight Commander use some of the same movement
  517. keys, so this section may be of use for those parts too.
  518. .TP
  519. .B Up, C-p
  520. moves one line backward.
  521. .TP
  522. .B Down, C-n
  523. moves one line forward.
  524. .TP
  525. .B Prev Page, Page Up, Alt-v
  526. moves one page up.
  527. .TP
  528. .B Next Page, Page Down, C-v
  529. moves one page down.
  530. .TP
  531. .B Home, A1
  532. moves to the beginning.
  533. .TP
  534. .B End, C1
  535. move to the end.
  536. .PP
  537. The help viewer and the file viewer accept the following keys in
  538. addition the to ones mentioned above:
  539. .TP
  540. .B b, C-b, C-h, Backspace, Delete
  541. moves one page up.
  542. .TP
  543. .B Space bar
  544. moves one page down.
  545. .TP
  546. .B u, d
  547. moves one half of a page up or down.
  548. .TP
  549. .B g, G
  550. moves to the beginning or to the end.
  551. .\"NODE " Input Line Keys"
  552. .SH " Input Line Keys"
  553. The input lines (they are used for the
  554. .\"LINK2"
  555. command line
  556. .\"Shell Command Line"
  557. and for the query dialogs in the program) accept these keys:
  558. .TP
  559. .B C-a
  560. puts the cursor at the beginning of line.
  561. .TP
  562. .B C-e
  563. puts the cursor at the end of the line.
  564. .TP
  565. .B C-b, move-left
  566. move the cursor one position left.
  567. .TP
  568. .B C-f, move-right
  569. move the cursor one position right.
  570. .TP
  571. .B Alt-f
  572. moves one word forward.
  573. .TP
  574. .B Alt-b
  575. moves one word backward.
  576. .TP
  577. .B C-h, backspace
  578. delete the previous character.
  579. .TP
  580. .B C-d, Delete
  581. delete the character in the point (over the cursor).
  582. .TP
  583. .B C-@
  584. sets the mark for cutting.
  585. .TP
  586. .B C-w
  587. copies the text between the cursor and the mark to a kill buffer and
  588. removes the text from the input line.
  589. .TP
  590. .B Alt-w
  591. copies the text between the cursor and the mark to a kill buffer.
  592. .TP
  593. .B C-y
  594. yanks back the contents of the kill buffer.
  595. .TP
  596. .B C-k
  597. kills the text from the cursor to the end of the line.
  598. .TP
  599. .B Alt-p, Alt-n
  600. Use these keys to browse through the command history. Alt-p takes you
  601. to the last entry, Alt-n takes you to the next one.
  602. .TP
  603. .B Alt-C-h, Alt-Backspace
  604. delete one word backward.
  605. .TP
  606. .B Alt-Tab
  607. does the filename, command, variable, username and hostname
  608. .\"LINK2"
  609. completion
  610. .\"Completion"
  611. for you.
  612. .SH ""
  613. .\"NODE "Menu Bar"
  614. .SH "Menu Bar"
  615. The menu bar pops up when you press F9 or click the mouse on the top
  616. row of the screen. The menu bar has five menus: "Left", "File",
  617. "Command", "Options" and "Right".
  618. .PP
  619. The
  620. .\"LINK2"
  621. Left and Right Menus
  622. .\"Left and Right Menus"
  623. allow you to modify the appearance of the left and right directory
  624. panels.
  625. .PP
  626. The
  627. .\"LINK2"
  628. File Menu
  629. .\"File Menu"
  630. lists the actions you can perform on the currently selected file or
  631. the tagged files.
  632. .PP
  633. The
  634. .\"LINK2"
  635. Command Menu
  636. .\"Command Menu"
  637. lists the actions which are more general and bear no relation to the
  638. currently selected file or the tagged files.
  639. .PP
  640. The
  641. .\"LINK2"
  642. Options Menu
  643. .\"Options Menu"
  644. lists the actions which allow you to customize the Midnight Commander.
  645. .\"NODE " Left and Right Menus"
  646. .SH " Left and Right (Above and Below) Menus"
  647. The outlook of the directory panels can be changed from the
  648. .B Left
  649. and
  650. .B Right
  651. menus (they are named
  652. .B Above
  653. and
  654. .B Below
  655. when the horizontal panel split is chosen from the
  656. .\"LINK2"
  657. Layout
  658. .\"Layout"
  659. options dialog).
  660. .\"NODE " Listing Mode..."
  661. .SH " Listing Mode..."
  662. The listing mode view is used to display a listing of files, there are
  663. four different listing modes available:
  664. .BR Full ,
  665. .BR Brief ,
  666. .B Long
  667. and
  668. .BR User .
  669. The full directory view shows the file name, the size of the file and
  670. the modification time.
  671. .PP
  672. The brief view shows only the file name and it has two columns
  673. (therefore showing twice as many files as other views). The long view
  674. is similar to the output of
  675. .B "ls -l"
  676. command. The long view takes the whole screen width.
  677. .PP
  678. If you choose the "User" display format, then you have to specify
  679. the display format.
  680. .PP
  681. The user display format must start with a panel size specifier. This
  682. may be "half" or "full", and they specify a half screen panel and a
  683. full screen panel respectively.
  684. .PP
  685. After the panel size, you may specify the two columns mode on the
  686. panel, this is done by adding the number "2" to the user format
  687. string.
  688. .PP
  689. After this you add the name of the fields with an optional size
  690. specifier. This are the available fields you may display:
  691. .TP
  692. .B name
  693. displays the file name.
  694. .TP
  695. .B size
  696. displays the file size.
  697. .TP
  698. .B bsize
  699. is an alternative form of the
  700. .B size
  701. format. It displays the size of the files and for directories it just
  702. shows SUB-DIR or UP--DIR.
  703. .TP
  704. .B type
  705. displays a one character wide type field. This character is similar to
  706. what is displayed by ls with the -F flag -
  707. .B *
  708. for executable files,
  709. .B /
  710. for directories,
  711. .B @
  712. for links,
  713. .B =
  714. for sockets,
  715. .B -
  716. for character devices,
  717. .B +
  718. for block devices,
  719. .B |
  720. for pipes,
  721. .B ~
  722. for symbolic links to directories and
  723. .B !
  724. for stale symlinks (links that point nowhere).
  725. .TP
  726. .B mark
  727. an asterisk if the file is tagged, a space if it's not.
  728. .TP
  729. .B mtime
  730. file's last modification time.
  731. .TP
  732. .B atime
  733. file's last access time.
  734. .TP
  735. .B ctime
  736. file's status change time.
  737. .TP
  738. .B perm
  739. a string representing the current permission bits of the file.
  740. .TP
  741. .B mode
  742. an octal value with the current permission bits of the file.
  743. .TP
  744. .B nlink
  745. the number of links to the file.
  746. .TP
  747. .B ngid
  748. the GID (numeric).
  749. .TP
  750. .B nuid
  751. the UID (numeric).
  752. .TP
  753. .B owner
  754. the owner of the file.
  755. .TP
  756. .B group
  757. the group of the file.
  758. .TP
  759. .B inode
  760. the inode of the file.
  761. .PP
  762. Also you can use following keywords to define the panel layout:
  763. .TP
  764. .B space
  765. a space in the display format.
  766. .TP
  767. .B |
  768. add a vertical line to the display format.
  769. .PP
  770. To force one field to a fixed size (a size specifier), you just add
  771. .B :
  772. followed by the number of characters you want the field to have. If the
  773. number is followed by the symbol
  774. .BR + ,
  775. then the size specifies the minimal field size - if the program finds
  776. out that there is more space on the screen, it will then expand that
  777. field.
  778. .PP
  779. For example, the
  780. .B Full
  781. display corresponds to this format:
  782. .PP
  783. half type name | size | mtime
  784. .PP
  785. And the
  786. .B Long
  787. display corresponds to this format:
  788. .PP
  789. full perm space nlink space owner space group space size space mtime
  790. space name
  791. .PP
  792. This is a nice user display format:
  793. .PP
  794. half name | size:7 | type mode:3
  795. .PP
  796. Panels may also be set to the following modes:
  797. .TP
  798. .B "Info"
  799. The info view display information related to the currently
  800. selected file and if possible information about the current file
  801. system.
  802. .TP
  803. .B "Tree"
  804. The tree view is quite similar to the
  805. .\"LINK2"
  806. directory tree
  807. .\"Directory Tree"
  808. feature. See the section about it for more information.
  809. .TP
  810. .B "Quick View"
  811. In this mode, the panel will switch to a reduced
  812. .\"LINK2"
  813. viewer
  814. .\"Internal File Viewer"
  815. that displays the contents of the currently selected file, if you
  816. select the panel (with the tab key or the mouse), you will have access
  817. to the usual viewer commands.
  818. .\"NODE " Sort Order..."
  819. .SH " Sort Order..."
  820. The eight sort orders are by name, by extension, by modification time,
  821. by access time, and by inode information modification time, by size,
  822. by inode and unsorted. In the Sort order dialog box you can choose
  823. the sort order and you may also specify if you want to sort in reverse
  824. order by checking the reverse box.
  825. .PP
  826. By default directories are sorted before files but this can be changed
  827. from the
  828. .\"LINK2"
  829. Options menu
  830. .\"Options Menu"
  831. (option
  832. .BR "Mix all files" ).
  833. .\"NODE " Filter..."
  834. .SH " Filter..."
  835. The filter command allows you to specify a shell pattern (for example
  836. .BR "*.tar.gz" )
  837. which the files must match to be shown. Regardless
  838. of the filter pattern, the directories and the links to directories
  839. are always shown in the directory panel.
  840. .\"NODE " Reread"
  841. .SH " Reread"
  842. The reread command reload the list of files in the directory. It is
  843. useful if other processes have created or removed files. If you
  844. have panelized file names in a panel this will reload the directory
  845. contents and remove the panelized information (See the section
  846. .\"LINK2"
  847. External panelize
  848. .\"External panelize"
  849. for more information).
  850. .\"NODE " File Menu"
  851. .SH " File Menu"
  852. The Midnight Commander uses the F1 - F10 keys as keyboard shortcuts
  853. for commands appearing in the file menu. The escape sequences for the
  854. function keys are terminfo capabilities kf1 trough kf10. On terminals
  855. without function key support, you can achieve the same functionality by
  856. pressing the ESC key and then a number in the range 1 through 9 and 0
  857. (corresponding to F1 to F9 and F10 respectively).
  858. .PP
  859. The File menu has the following commands (keyboard shortcuts in parentheses):
  860. .PP
  861. .B Help (F1)
  862. .PP
  863. Invokes the built-in hypertext help viewer. Inside the
  864. .\"LINK2"
  865. help viewer\&,
  866. .\"Contents"
  867. you can use the Tab key to select the next link and the Enter key to
  868. follow that link. The keys Space and Backspace are used to move
  869. forward and backward in a help page. Press F1 again to get the full
  870. list of accepted keys.
  871. .PP
  872. .B Menu (F2)
  873. .PP
  874. Invoke the
  875. .\"LINK2"
  876. user menu\&.
  877. .\"Menu File Edit"
  878. The user menu provides an easy way to provide users with a menu and
  879. add extra features to the Midnight Commander.
  880. .PP
  881. .B View (F3, Shift-F3)
  882. .PP
  883. View the currently selected file. By default this invokes the
  884. .\"LINK2"
  885. Internal File Viewer
  886. .\"Internal File Viewer"
  887. but if the option "Use internal view" is off, it invokes an external
  888. file viewer specified by the
  889. .B VIEWER
  890. environment variable. If
  891. .B VIEWER
  892. is undefined, the
  893. .B PAGER
  894. environment variable is tried. If
  895. .B PAGER
  896. is also undefined, the "view" command is invoked. If you use Shift-F3
  897. instead, the viewer will be invoked without doing any formatting or
  898. preprocessing to the file.
  899. .PP
  900. .B Filtered View (Alt-!)
  901. .PP
  902. This command prompts for a command
  903. and its arguments (the argument defaults to the currently selected
  904. file name), the output from such command is shown in the internal file
  905. viewer.
  906. .PP
  907. .B Edit (F4, F14)
  908. .PP
  909. Press F4 to edit the highlighted file. Press F14 (usually Shift-F4)
  910. to start the editor with a new, empty file.
  911. Currently they invoke the
  912. .B vi
  913. editor, or the editor specified in the
  914. .B EDITOR
  915. environment variable, or the
  916. .\"LINK2"
  917. Internal File Editor
  918. .\"Internal File Editor"
  919. if the use_internal_edit option is on.
  920. .PP
  921. .B Copy (F5, F15)
  922. .PP
  923. Press F5 to pop up an input dialog to copy the currently selected file (or
  924. the tagged files, if there is at least one file tagged) to the
  925. directory/filename you specify in the input dialog. The destination
  926. defaults to the directory in the non-selected panel. During this
  927. process, you can press C-c or ESC to abort the operation. For details
  928. about source mask (which will be usually either * or ^\\(.*\\)$ depending
  929. on setting of Use shell patterns) and possible wildcards in the destination
  930. see
  931. .\"LINK2"
  932. Mask copy/rename\&.
  933. .\"Mask Copy/Rename"
  934. .PP
  935. F15 (usually Shift-F5) is similar, but defaults to the directory in the
  936. selected panel. It always operates on the selected file, regardless of
  937. any tagged files.
  938. .PP
  939. On some systems, it is possible to do the copy in the background by
  940. clicking on the background button (or pressing Alt-b in the dialog
  941. box). The
  942. .\"LINK2"
  943. Background Jobs
  944. .\"Background jobs"
  945. is used to control the background process.
  946. .PP
  947. .B Link (C-x l)
  948. .PP
  949. Create a hard link to the current file.
  950. .PP
  951. .B SymLink (C-x s)
  952. .PP
  953. Create a symbolic link to the current file. To those of you who don't
  954. know what links are: creating a link to a file is a bit like copying
  955. the file, but both the source filename and the destination filename
  956. represent the same file image. For example, if you edit one of these
  957. files, all changes you make will appear in both files. Some people call
  958. links aliases or shortcuts.
  959. .PP
  960. A hard link appears as a real file. After making it, there is no way of
  961. telling which one is the original and which is the link. If you delete
  962. either one of them the other one is still intact. It is very difficult
  963. to notice that the files represent the same image. Use hard links when
  964. you don't even want to know.
  965. .PP
  966. A symbolic link is a reference to the name of the original file. If
  967. the original file is deleted the symbolic link is useless. It is quite
  968. easy to notice that the files represent the same image. The Midnight
  969. Commander shows an "@"-sign in front of the file name if it is a
  970. symbolic link to somewhere (except to directory, where it shows a tilde (~)).
  971. The original file which the link points to is shown on mini-status line if the
  972. .I "Show mini-status"
  973. option is enabled. Use symbolic links when you want to avoid the
  974. confusion that can be caused by hard links.
  975. .PP
  976. .B Rename/Move (F6, F16)
  977. .PP
  978. Press F6 to pop up an input dialog to copy the currently selected file (or
  979. the tagged files, if there is at least one file tagged) to the
  980. directory/filename you specify in the input dialog. The destination
  981. defaults to the directory in the non-selected panel. For more details
  982. look at Copy (F5) operation above, most of the things are quite similar.
  983. .PP
  984. F16 (usually Shift-F6) is similar, but defaults to the directory in the
  985. selected panel. It always operates on the selected file, regardless of
  986. any tagged files.
  987. .PP
  988. On some systems, it is possible to do the copy in the background by
  989. clicking on the background button (or pressing Alt-b in the dialog
  990. box). The
  991. .\"LINK2"
  992. Background Jobs
  993. .\"Background jobs"
  994. is used to control the background process.
  995. .PP
  996. .B Mkdir (F7)
  997. .PP
  998. Pop up an input dialog and creates the directory specified.
  999. .PP
  1000. .B Delete (F8)
  1001. .PP
  1002. Delete the currently selected file or the tagged files in the
  1003. currently selected panel. During the process, you can press C-c or
  1004. ESC to abort the operation.
  1005. .PP
  1006. .B Quick cd (Alt-c)
  1007. Use the
  1008. .\"LINK2"
  1009. quick cd
  1010. .\"Quick cd"
  1011. command if you have full command line and want to cd somewhere.
  1012. .PP
  1013. .B Select group (+)
  1014. .PP
  1015. This is used to select (tag) a group of files. The Midnight Commander
  1016. will prompt for a regular expression describing the group. When
  1017. .I Shell Patterns
  1018. are enabled, the regular expression is much like the filename globbing
  1019. in the shell (* standing for zero or more characters and ? standing
  1020. for one character). If
  1021. .I Shell Patterns
  1022. is off, then the tagging of files is done with normal regular
  1023. expressions (see ed (1)).
  1024. .PP
  1025. To mark directories instead of files, the expression must start or end
  1026. with a '/'.
  1027. .PP
  1028. .B Unselect group (\\\\)
  1029. .PP
  1030. Used to unselect a group of files. This is the opposite of the
  1031. .I "Select group"
  1032. command.
  1033. .PP
  1034. .B Quit (F10, Shift-F10)
  1035. .PP
  1036. Terminate the Midnight Commander. Shift-F10 is used when you want to
  1037. quit and you are using the shell wrapper. Shift-F10 will not take you
  1038. to the last directory you visited with the Midnight Commander, instead
  1039. it will stay at the directory where you started the Midnight Commander.
  1040. .\"NODE " Quick cd"
  1041. .SH " Quick cd"
  1042. This command is useful if you have a full command line and want to
  1043. .\"LINK2"
  1044. cd
  1045. .\"The cd internal command"
  1046. somewhere without having to yank and paste the command line. This command
  1047. pops up a small dialog, where you enter everything you would enter after
  1048. .B cd
  1049. on the command line and then you press enter. This features all the things
  1050. that are already in the
  1051. .\"LINK2"
  1052. internal cd command\&.
  1053. .\"The cd internal command"
  1054. .\"NODE " Command Menu"
  1055. .SH " Command Menu"
  1056. The
  1057. .\"LINK2"
  1058. Directory tree
  1059. .\"Directory Tree"
  1060. command shows a tree figure of the directories.
  1061. .PP
  1062. The
  1063. .\"LINK2"
  1064. Find file
  1065. .\"Find File"
  1066. command allows you to search for a specific file.
  1067. .PP
  1068. The "Swap panels" command swaps the contents of the two directory panels.
  1069. .PP
  1070. The "Panels on/off" command shows the output of the last shell command.
  1071. This works only on xterm and on Linux and FreeBSD console.
  1072. .PP
  1073. The Compare directories (C-x d) command compares the directory
  1074. panels with each other. You can then use the Copy (F5) command to make
  1075. the panels identical. There are three compare methods. The quick method
  1076. compares only file size and file date. The thorough method makes a
  1077. full byte-by-byte compare. The thorough method is not available if the
  1078. machine does not support the mmap(2) system call. The size-only
  1079. compare method just compares the file sizes and does not check the
  1080. contents or the date times, it just checks the file size.
  1081. .PP
  1082. The Command history command shows a list of typed commands. The
  1083. selected command is copied to the command line. The command history
  1084. can also be accessed by typing Alt-p or Alt-n.
  1085. .PP
  1086. The
  1087. .\"LINK2"
  1088. Directory hotlist (C-\\)
  1089. .\"Hotlist"
  1090. command makes changing of the current directory to often used directories
  1091. faster.
  1092. .PP
  1093. The
  1094. .\"LINK2"
  1095. External panelize
  1096. .\"External panelize"
  1097. allows you to execute an external program, and make the output of that
  1098. program the contents of the current panel.
  1099. .PP
  1100. .\"LINK2"
  1101. Extension file edit
  1102. .\"Extension File Edit"
  1103. command allows you to specify programs to executed when you try to
  1104. execute, view, edit and do a bunch of other thing on files
  1105. with certain extensions (filename endings). The
  1106. .\"LINK2"
  1107. Menu file edit
  1108. .\"Menu File Edit"
  1109. command may be used for editing the user menu (which appears by
  1110. pressing F2).
  1111. .\"NODE " Directory Tree"
  1112. .SH " Directory Tree"
  1113. The Directory Tree command shows a tree figure of the directories. You
  1114. can select a directory from the figure and the Midnight Commander will
  1115. change to that directory.
  1116. .PP
  1117. There are two ways to invoke the tree. The real directory tree command
  1118. is available from Commands menu. The other way is to select tree view
  1119. from the Left or Right menu.
  1120. .PP
  1121. To get rid of long delays the Midnight Commander creates the tree
  1122. figure by scanning only a small subset of all the directories. If the
  1123. directory which you want to see is missing, move to its parent
  1124. directory and press C-r (or F2).
  1125. .PP
  1126. You can use the following keys:
  1127. .PP
  1128. .\"LINK2"
  1129. General movement keys
  1130. .\"General Movement Keys"
  1131. are accepted.
  1132. .PP
  1133. .B Enter.
  1134. In the directory tree, exits the directory tree and changes to this
  1135. directory in the current panel. In the tree view, changes to this
  1136. directory in the other panel and stays in tree view mode in the
  1137. current panel.
  1138. .PP
  1139. .B C-r, F2 (Rescan).
  1140. Rescan this directory. Use this when the tree figure is out of date:
  1141. it is missing subdirectories or shows some subdirectories which don't
  1142. exist any more.
  1143. .PP
  1144. .B F3 (Forget).
  1145. Delete this directory from the tree figure. Use this to remove clutter
  1146. from the figure. If you want the directory back to the tree figure
  1147. press F2 in its parent directory.
  1148. .PP
  1149. .B F4 (Static/Dynamic).
  1150. Toggle between the dynamic navigation mode (default) and the static
  1151. navigation mode.
  1152. .PP
  1153. In the static navigation mode you can use the Up and Down keys to
  1154. select a directory. All known directories are shown.
  1155. .PP
  1156. In the dynamic navigation mode you can use the Up and Down keys to
  1157. select a sibling directory, the Left key to move to the parent
  1158. directory, and the Right key to move to a child directory. Only the
  1159. parent, sibling and children directories are shown, others are left
  1160. out. The tree figure changes dynamically as you traverse.
  1161. .PP
  1162. .B F5 (Copy).
  1163. Copy the directory.
  1164. .PP
  1165. .B F6 (RenMov).
  1166. Move the directory.
  1167. .PP
  1168. .B F7 (Mkdir).
  1169. Make a new directory below this directory.
  1170. .PP
  1171. .B F8 (Delete).
  1172. Delete this directory from the file system.
  1173. .PP
  1174. .B C-s, Alt-s.
  1175. Search the next directory matching the search string. If there is
  1176. no such directory these keys will move one line down.
  1177. .PP
  1178. .B C-h, Backspace.
  1179. Delete the last character of the search string.
  1180. .PP
  1181. .B Any other character.
  1182. Add the character to the search string and move to the next directory
  1183. which starts with these characters. In the tree view you must first
  1184. activate the search mode by pressing C-s. The search string is shown
  1185. in the mini status line.
  1186. .PP
  1187. The following actions are available only in the directory tree. They
  1188. aren't supported in the tree view.
  1189. .PP
  1190. .B F1 (Help).
  1191. Invoke the help viewer and show this section.
  1192. .PP
  1193. .B Esc, F10.
  1194. Exit the directory tree. Do not change the directory.
  1195. .PP
  1196. The mouse is supported. A double-click behaves like Enter. See
  1197. also the section on
  1198. .\"LINK2"
  1199. mouse support\&.
  1200. .\"Mouse Support"
  1201. .\"NODE " Find File"
  1202. .SH " Find File"
  1203. The Find File feature first asks for the start directory for the
  1204. search and the filename to be searched for. By pressing the Tree
  1205. button you can select the start directory from the
  1206. .\"LINK2"
  1207. directory tree
  1208. .\"Directory Tree"
  1209. figure.
  1210. .PP
  1211. The contents field accepts regular expressions similar to egrep(1). That
  1212. means you have to escape characters with a special meaning to egrep with "\\",
  1213. e.g. if you search for "strcmp (" you will have to input "strcmp \\("
  1214. (without the double quotes).
  1215. .PP
  1216. You can start the search by pressing the OK button.
  1217. During the search you can stop from the Stop button and continue from
  1218. the Start button.
  1219. .PP
  1220. You can browse the filelist with the up and down arrow keys. The Chdir
  1221. button will change to the directory of the currently selected
  1222. file. The Again button will ask for the parameters for a new
  1223. search. The Quit button quits the search operation. The Panelize
  1224. button will place the found files to the current directory panel so
  1225. that you can do additional operations on them (view, copy, move,
  1226. delete and so on). After panelizing you can press C-r to return to the
  1227. normal file listing.
  1228. .PP
  1229. It is possible to have a list of directories that the Find File command
  1230. should skip during the search (for example, you may want to avoid
  1231. searches on a CD-ROM or on a NFS directory that is mounted across a slow
  1232. link).
  1233. .PP
  1234. Directories to be skipped should be set on the variable
  1235. .B find_ignore_dirs
  1236. in the
  1237. .B Misc
  1238. section of your ~/.mc/ini file.
  1239. .PP
  1240. Directory components should be separated with a colon, here is an
  1241. example:
  1242. .PP
  1243. .nf
  1244. [Misc]
  1245. find_ignore_dirs=/cdrom:/nfs/wuarchive:/afs
  1246. .fi
  1247. .PP
  1248. You may consider using the
  1249. .\"LINK2"
  1250. External panelize
  1251. .\"External panelize"
  1252. command for some operations. Find file command is for simple queries
  1253. only, while using External panelize you can do as mysterious searches
  1254. as you would like.
  1255. .\"NODE " External panelize"
  1256. .SH " External panelize"
  1257. The External panelize allows you to execute an external program, and
  1258. make the output of that program the contents of the current panel.
  1259. .PP
  1260. For example, if you want to manipulate in one of the panels all the
  1261. symbolic links in the current directory, you can use external
  1262. panelization to run the following command:
  1263. .PP
  1264. .nf
  1265. find . -type l -print
  1266. .fi
  1267. .PP
  1268. Upon command completion, the directory contents of the panel will no
  1269. longer be the directory listing of the current directory, but all the
  1270. files that are symbolic links.
  1271. .PP
  1272. If you want to panelize all of the files that have been downloaded
  1273. from your FTP server, you can use this awk command to extract the file
  1274. name from the transfer log files:
  1275. .PP
  1276. .nf
  1277. awk '$9 ~! /incoming/ { print $9 }' < /usr/adm/xferlog
  1278. .fi
  1279. .PP
  1280. You may want to save often used panelize commands under a descriptive name,
  1281. so that you can recall them quickly. You do this by typing the command on
  1282. the input line and pressing Add new button. Then you enter a name under
  1283. which you want the command to be saved. Next time, you just choose that
  1284. command from the list and do not have to type it again.
  1285. .\"NODE " Hotlist"
  1286. .SH " Hotlist"
  1287. The Directory hotlist command shows the labels of the directories
  1288. in the directory hotlist. The Midnight Commander will change to the
  1289. directory corresponding to the selected label. From the hotlist dialog,
  1290. you can remove already created label/directory pairs and add new ones.
  1291. To add new directories quickly, you can use the Add to hotlist command
  1292. (C-x h), which adds the current directory into the directory hotlist,
  1293. asking just for the label for the directory.
  1294. .PP
  1295. This makes cd to often used directories faster. You may consider using the
  1296. CDPATH variable as described in
  1297. .\"LINK2"
  1298. internal cd command
  1299. .\"The cd internal command"
  1300. description.
  1301. .\"NODE " Extension File Edit"
  1302. .SH " Extension File Edit"
  1303. This will invoke your editor on the file
  1304. .IR ~/.mc/bindings .
  1305. The format of this file following:
  1306. .PP
  1307. All lines starting with # or empty lines are thrown away.
  1308. .PP
  1309. Lines starting in the first column should have following format:
  1310. .PP
  1311. .IR keyword/expr ,
  1312. i.e. everything after the slash until new line is
  1313. .IR expr .
  1314. .PP
  1315. .I keyword
  1316. can be:
  1317. .TP
  1318. .I shell
  1319. \-
  1320. .I expr
  1321. is an extension (no wildcards). File matches it its name ends
  1322. with
  1323. .IR expr .
  1324. Example:
  1325. .I shell/.tar
  1326. matches
  1327. .IR *.tar .
  1328. .TP
  1329. .I regex
  1330. \-
  1331. .I expr
  1332. is a regular expression. File matches if its name matches the regular
  1333. expression.
  1334. .TP
  1335. .I directory
  1336. \-
  1337. .I expr
  1338. is a regular expression. File matches if it is a directory and its name
  1339. matches the regular expression.
  1340. .TP
  1341. .I type
  1342. \-
  1343. .I expr
  1344. is a regular expression. File matches if the output of
  1345. .I file %f
  1346. without the initial "filename:" part matches regular expression
  1347. .IR expr .
  1348. .TP
  1349. .I default
  1350. \- matches any file.
  1351. .I expr
  1352. is ignored.
  1353. .TP
  1354. .I include
  1355. \- denotes a common section.
  1356. .I expr
  1357. is the name of the section.
  1358. .PP
  1359. Other lines should start with a space or tab and should be of the format:
  1360. .I keyword=command
  1361. (with no spaces around =), where
  1362. .I keyword
  1363. should be:
  1364. .I Open
  1365. (invoked on Enter or double click),
  1366. .I View
  1367. (F3),
  1368. .I Edit
  1369. (F4) or
  1370. .I Include
  1371. (to add rules from the common section).
  1372. .I command
  1373. is any one-line shell command, with the simple
  1374. .\"LINK2"
  1375. macro substitution\&.
  1376. .\"Macro Substitution"
  1377. .PP
  1378. Rules are matched from top to bottom, thus the order is important. If
  1379. the appropriate action is missing, search continues as if this rule
  1380. didn't match (i.e. if a file matches the first and second entry and View
  1381. action is missing in the first one, then on pressing F3 the View action
  1382. from the second entry will be used).
  1383. .I default
  1384. should match all the actions.
  1385. .\"NODE " Background jobs"
  1386. .SH " Background Jobs"
  1387. This lets you control the state of any background Midnight Commander
  1388. process (only copy and move files operations can be done in the
  1389. background). You can stop, restart and kill a background job from
  1390. here.
  1391. .\"NODE " Menu File Edit"
  1392. .SH " Menu File Edit"
  1393. The user menu is a menu of useful actions that can be customized by
  1394. the user. When you access the user menu, the
  1395. file .mc.menu from the current directory is used if it exists,
  1396. but only if it is owned by user or root and is not world-writable.
  1397. If no such file found, ~/.mc/menu is tried in the same way,
  1398. and otherwise mc uses the default system-wide menu
  1399. @prefix@/share/mc/mc.menu.
  1400. .PP
  1401. The format of the menu file is very simple. Lines that start with
  1402. anything but space or tab are considered entries for the menu (in
  1403. order to be able to use it like a hot key, the first character should
  1404. be a letter). All the lines that start with a space or a tab are the
  1405. commands that will be executed when the entry is selected.
  1406. .PP
  1407. When an option is selected all the command lines of the option are
  1408. copied to a temporary file in the temporary directory (usually
  1409. /usr/tmp) and then that file is executed. This allows the user to put
  1410. normal shell constructs in the menus. Also simple macro substitution
  1411. takes place before executing the menu code. For more information, see
  1412. .\"LINK2"
  1413. macro substitution\&.
  1414. .\"Macro Substitution"
  1415. .PP
  1416. Here is a sample mc.menu file:
  1417. .PP
  1418. .nf
  1419. A Dump the currently selected file
  1420. od -c %f
  1421. B Edit a bug report and send it to root
  1422. I=`mktemp ${MC_TMPDIR:-/tmp}/mail.XXXXXX` || exit 1
  1423. vi $I
  1424. mail -s "Midnight Commander bug" root < $I
  1425. rm -f $I
  1426. M Read mail
  1427. emacs -f rmail
  1428. N Read Usenet news
  1429. emacs -f gnus
  1430. H Call the info hypertext browser
  1431. info
  1432. J Copy current directory to other panel recursively
  1433. tar cf - . | (cd %D && tar xvpf -)
  1434. K Make a release of the current subdirectory
  1435. echo -n "Name of distribution file: "
  1436. read tar
  1437. ln -s %d `dirname %d`/$tar
  1438. cd ..
  1439. tar cvhf ${tar}.tar $tar
  1440. = f *.tar.gz | f *.tgz & t n
  1441. X Extract the contents of a compressed tar file
  1442. tar xzvf %f
  1443. .fi
  1444. .PP
  1445. .B Default Conditions
  1446. .PP
  1447. Each menu entry may be preceded by a condition. The condition must
  1448. start from the first column with a '=' character. If the condition is
  1449. true, the menu entry will be the default entry.
  1450. .PP
  1451. .nf
  1452. Condition syntax: = <sub-cond>
  1453. or: = <sub-cond> | <sub-cond> ...
  1454. or: = <sub-cond> & <sub-cond> ...
  1455. Sub-condition is one of following:
  1456. y <pattern> syntax of current file matching pattern?
  1457. (for edit menu only)
  1458. f <pattern> current file matching pattern?
  1459. F <pattern> other file matching pattern?
  1460. d <pattern> current directory matching pattern?
  1461. D <pattern> other directory matching pattern?
  1462. t <type> current file of type?
  1463. T <type> other file of type?
  1464. x <filename> is it executable filename?
  1465. ! <sub-cond> negate the result of sub-condition
  1466. .fi
  1467. .PP
  1468. Pattern is a normal shell pattern or a regular expression, according
  1469. to the shell patterns option. You can override the global value of
  1470. the shell patterns option by writing "shell_patterns=x" on the first
  1471. line of the menu file (where "x" is either 0 or 1).
  1472. .PP
  1473. Type is one or more of the following characters:
  1474. .PP
  1475. .nf
  1476. n not a directory
  1477. r regular file
  1478. d directory
  1479. l link
  1480. c character device
  1481. b block device
  1482. f FIFO (pipe)
  1483. s socket
  1484. x executable file
  1485. t tagged
  1486. .fi
  1487. .PP
  1488. For example 'rlf' means either regular file, link or fifo. The 't'
  1489. type is a little special because it acts on the panel instead of the
  1490. file. The condition '=t t' is true if there are tagged files in the
  1491. current panel and false if not.
  1492. .PP
  1493. If the condition starts with '=?' instead of '=' a debug trace will be
  1494. shown whenever the value of the condition is calculated.
  1495. .PP
  1496. The conditions are calculated from left to right. This means
  1497. .nf
  1498. = f *.tar.gz | f *.tgz & t n
  1499. .fi
  1500. is calculated as
  1501. .nf
  1502. ( (f *.tar.gz) | (f *.tgz) ) & (t n)
  1503. .fi
  1504. .PP
  1505. Here is a sample of the use of conditions:
  1506. .PP
  1507. .nf
  1508. = f *.tar.gz | f *.tgz & t n
  1509. L List the contents of a compressed tar-archive
  1510. gzip -cd %f | tar xvf -
  1511. .fi
  1512. .PP
  1513. .B Addition Conditions
  1514. .PP
  1515. If the condition begins with '+' (or '+?') instead of '=' (or '=?') it
  1516. is an addition condition. If the condition is true the menu entry will
  1517. be included in the menu. If the condition is false the menu entry will
  1518. not be included in the menu.
  1519. .PP
  1520. You can combine default and addition conditions by starting condition
  1521. with '+=' or '=+' (or '+=?' or '=+?' if you want debug trace). If you
  1522. want to use two different conditions, one for adding and another for
  1523. defaulting, you can precede a menu entry with two condition lines, one
  1524. starting with '+' and another starting with '='.
  1525. .PP
  1526. Comments are started with '#'. The additional comment lines must start
  1527. with '#', space or tab.
  1528. .\"NODE " Options Menu"
  1529. .SH " Options Menu"
  1530. The Midnight Commander has some options that may be toggled on and
  1531. off in several dialogs which are accessible from this menu. Options
  1532. are enabled if they have an asterisk or "x" in front of them.
  1533. .PP
  1534. The
  1535. .\"LINK2"
  1536. Configuration
  1537. .\"Configuration"
  1538. command pops up a dialog from which you can change most of settings of
  1539. the Midnight Commander.
  1540. .PP
  1541. The
  1542. .\"LINK2"
  1543. Layout
  1544. .\"Layout"
  1545. command pops up a dialog from which you specify a bunch of options how mc
  1546. looks like on the screen.
  1547. .PP
  1548. The
  1549. .\"LINK2"
  1550. Confirmation
  1551. .\"Confirmation"
  1552. command pops up a dialog from which you specify which actions you want to
  1553. confirm.
  1554. .PP
  1555. The
  1556. .\"LINK2"
  1557. Display bits
  1558. .\"Display bits"
  1559. command pops up a dialog from which you may select which characters is your
  1560. terminal able to display.
  1561. .PP
  1562. The
  1563. .\"LINK2"
  1564. Learn keys
  1565. .\"Learn keys"
  1566. command pops up a dialog from which you test some keys which are not working
  1567. on some terminals and you may fix them.
  1568. .PP
  1569. The
  1570. .\"LINK2"
  1571. Virtual FS
  1572. .\"Virtual FS"
  1573. command pops up a dialog from which you specify some VFS related options.
  1574. .PP
  1575. The
  1576. .\"LINK2"
  1577. Save setup
  1578. .\"Save Setup"
  1579. command saves the current settings of the Left, Right and Options
  1580. menus. A small number of other settings is saved, too.
  1581. .\"NODE " Configuration"
  1582. .SH " Configuration"
  1583. The options in this dialog are divided into three groups:
  1584. Panel Options, Pause after run and Other Options.
  1585. .PP
  1586. .B Panel Options
  1587. .PP
  1588. .I Show Backup Files.
  1589. If enabled, the Midnight Commander will show files ending with a tilde.
  1590. Otherwise, they won't be shown (like GNU's ls option -B).
  1591. .PP
  1592. .I Show Hidden Files.
  1593. If enabled, the Midnight Commander will show all files that start with
  1594. a dot (like ls -a).
  1595. .PP
  1596. .I Mark moves down.
  1597. If enabled, the selection bar will move down when you mark a file (with
  1598. either C-t or the Insert key).
  1599. .PP
  1600. .I Drop down menus.
  1601. When this option is enabled, the pull down menus will be activated as
  1602. soon as you press the
  1603. .B F9
  1604. key. Otherwise, you will only get the menu title, and you will have
  1605. to activate the menu either with the arrow keys or with the hotkeys.
  1606. It is recommended if you are using hotkeys.
  1607. .PP
  1608. .I Mix all files.
  1609. If this option is enabled, all files and directories are shown mixed
  1610. together. If the option is off, directories (and links to directories)
  1611. are shown at the beginning of the listing, and other files below.
  1612. .PP
  1613. .I Fast directory reload.
  1614. If this option is enabled, the Midnight Commander will use a trick to
  1615. determine if the directory contents have changed. The trick is to reload
  1616. the directory only if the i-node of the directory has changed; this means
  1617. that reloads only happen when files are created or deleted. If what
  1618. changes is the i-node for a file in the directory (file size changes,
  1619. mode or owner changes, etc) the display is not updated. In these cases,
  1620. if you have the option on, you have to rescan the directory manually
  1621. (with C-r).
  1622. .PP
  1623. .B Pause after run
  1624. .PP
  1625. After executing your commands, the Midnight Commander can pause, so
  1626. that you can examine the output of the command. There are three
  1627. possible settings for this variable:
  1628. .PP
  1629. .I Never.
  1630. Means that you do not want to see the output of your command. If you
  1631. are using the Linux or FreeBSD console or an xterm, you will be able to
  1632. see the output of the command by typing C-o.
  1633. .PP
  1634. .I On dumb terminals.
  1635. You will get the pause message on terminals that are not capable of
  1636. showing the output of the last command executed (any terminal that is
  1637. not an xterm or the Linux console).
  1638. .PP
  1639. .I Always.
  1640. The program will pause after executing all of your commands.
  1641. .PP
  1642. .B Other Options
  1643. .PP
  1644. .I Verbose operation.
  1645. This toggles whether the file Copy, Rename and Delete operations are
  1646. verbose (i.e., display a dialog box for each operation). If you have a
  1647. slow terminal, you may wish to disable the verbose operation. It is
  1648. automatically turned off if the speed of your terminal is less than
  1649. 9600 bps.
  1650. .PP
  1651. .I Compute totals.
  1652. If this option is enabled, the Midnight
  1653. Commander computes total byte sizes and total number of files
  1654. prior to any Copy, Rename and Delete operations. This will
  1655. provide you with a more accurate progress bar at the expense
  1656. of some speed. This option has no effect, if
  1657. .I Verbose operation
  1658. is disabled.
  1659. .PP
  1660. .I Shell Patterns.
  1661. By default the Select, Unselect and Filter commands will use shell-like
  1662. regular expressions. The following conversions are performed to achieve
  1663. this: the '*' is replaced by '.*' (zero or more characters); the '?'
  1664. is replaced by '.' (exactly one character) and '.' by the literal
  1665. dot. If the option is disabled, then the regular expressions are the
  1666. ones described in ed(1).
  1667. .PP
  1668. .I Auto Save Setup.
  1669. If this option is enabled, when you exit the Midnight Commander the
  1670. configurable options of the Midnight Commander are saved in the
  1671. ~/.mc/ini file.
  1672. .PP
  1673. .I Auto menus.
  1674. If this option is enabled, the user menu will be invoked at startup.
  1675. Useful for building menus for non-unixers.
  1676. .PP
  1677. .I Use internal editor.
  1678. If this option is enabled, the built-in file editor is used to edit
  1679. files. If the option is disabled, the editor specified in the
  1680. .B EDITOR
  1681. environment variable is used.
  1682. If no editor is specified,
  1683. .B vi
  1684. is used. See the section on the
  1685. .\"LINK2"
  1686. internal file editor\&.
  1687. .\"Internal File Editor"
  1688. .PP
  1689. .I Use internal viewer.
  1690. If this option is enabled, the built-in file viewer is used to view
  1691. files. If the option is disabled, the pager specified in the
  1692. .B PAGER
  1693. environment variable is used.
  1694. If no pager is specified, the
  1695. .B view
  1696. command is used. See the section on the
  1697. .\"LINK2"
  1698. internal file viewer\&.
  1699. .\"Internal File Viewer"
  1700. .PP
  1701. .I Complete: show all.
  1702. By default the Midnight Commander pops up all possible
  1703. .\"LINK2"
  1704. completions
  1705. .\"Completion"
  1706. if the completion is ambiguous only when you press
  1707. .B Alt-Tab
  1708. for the second time. For the first time, it just completes as much as
  1709. possible and beeps in the case of ambiguity. Enable this option if you
  1710. want to see all possible completions even after pressing
  1711. .B Alt-Tab
  1712. the first time.
  1713. .PP
  1714. .I Rotating dash.
  1715. If this option is enabled, the
  1716. Midnight Commander shows a rotating dash in the upper right corner
  1717. as a work in progress indicator.
  1718. .PP
  1719. .I Lynx-like motion.
  1720. If this option is enabled,
  1721. you may use the arrows keys to automatically chdir if the
  1722. current selection is a subdirectory and the shell command
  1723. line is empty. By default, this setting is off.
  1724. .PP
  1725. .I Cd follows links.
  1726. This option, if set, causes the Midnight Commander to follow the
  1727. logical chain of directories when changing current directory
  1728. either in the panels, or using the cd command. This is the default
  1729. behavior of bash. When unset, the Midnight Commander follows the
  1730. real directory structure, so cd .. if you've entered that directory
  1731. through a link will move you to the current directory's real parent
  1732. and not to the directory where the link was present.
  1733. .PP
  1734. .I Safe delete.
  1735. If this option is enabled, deleting files and directory hotlist entries
  1736. unintentionally becomes more difficult. The default selection in the
  1737. confirmation dialogs for deletion changes from "Yes" to "No".
  1738. This option is disabled by default.
  1739. .\"NODE " Layout"
  1740. .SH " Layout"
  1741. The layout dialog gives you a possibility to change the general layout
  1742. of screen. You can specify whether the menubar, the command prompt, the
  1743. hintbar and the function keybar are visible. On the Linux or FreeBSD
  1744. console you can specify how many lines are shown in the output window.
  1745. .PP
  1746. The rest of the screen area is used for the two directory panels. You
  1747. can specify whether the area is split to the panels in vertical or
  1748. horizontal direction. The split can be equal or you can specify an
  1749. unequal split.
  1750. .PP
  1751. You can specify whether
  1752. .I permissions
  1753. and
  1754. .I file types
  1755. should be highlighted with distinctive
  1756. .\"LINK2"
  1757. Colors\&.
  1758. .\"Colors"
  1759. If the permission highlighting is enabled, the parts of the
  1760. .I perm
  1761. and
  1762. .I mode
  1763. .\"LINK2"
  1764. display fields
  1765. .\"Listing Mode..."
  1766. which apply to the user running Midnight Commander are highlighted with
  1767. the color defined by the
  1768. .I selected
  1769. keyword. If the file type highlighting is enabled, files are colored
  1770. according to their file type (e.g. directory, core file, executable,
  1771. and so on).
  1772. .PP
  1773. If the
  1774. .I Show Mini-Status
  1775. option is enabled, one line of status information about the currently
  1776. selected item is shown at the bottom of the panels.
  1777. .PP
  1778. When run in a terminal emulator for X11, Midnight Commander sets the
  1779. terminal window title to the current working directory and updates it
  1780. when necessary. If your terminal emulator is broken and you see some
  1781. incorrect output on startup and directory change, turn off the
  1782. .I Xterm Window Title
  1783. option.
  1784. .\"NODE " Confirmation"
  1785. .SH " Confirmation"
  1786. In this menu you configure the confirmation options for file deletion,
  1787. directory hotlist entries deletion, overwriting, execution by pressing
  1788. enter and quitting the program.
  1789. .\"NODE " Display bits"
  1790. .SH " Display bits"
  1791. This is used to configure the range of visible characters on the
  1792. screen. This setting may be 7-bits if your terminal/curses supports
  1793. only seven output bits, ISO-8859-1 displays all the characters in the
  1794. ISO-8859-1 map and full 8 bits is for those terminals that can display
  1795. full 8 bit characters.
  1796. .\"NODE " Learn keys"
  1797. .SH " Learn keys"
  1798. This dialog allows you to test and redefine functional keys, cursor
  1799. arrows and some other keys to make them work properly on your terminal.
  1800. They often don't, since many terminal databases are incomplete or broken.
  1801. .PP
  1802. You can move around with the Tab key and with the vi moving keys ('h'
  1803. left, 'j' down, 'k' up and 'l' right). Once you press any cursor movement
  1804. key and it is recognized, you can use that key as well.
  1805. .PP
  1806. You can test keys just by pressing each of them. When you press a
  1807. key and it is recognized properly, OK should appear next to the name
  1808. of that key. Once a key is marked OK it starts working as usually,
  1809. e.g. F1 pressed the first time will just check that the F1 key works,
  1810. but after that it will show help. The same applies to the arrow keys.
  1811. The Tab key should be working always.
  1812. .PP
  1813. If some keys do not work properly then you won't see OK appear after
  1814. pressing one of these. Then you may want to redefine it. Do it by pressing
  1815. the button with the name of that key (either by the mouse or by Enter
  1816. or Space after selecting the button with Tab or arrows). Then a message
  1817. box will appear asking you to press that key. Do it and wait until the
  1818. message box disappears. If you want to abort, just press Escape once
  1819. and wait.
  1820. .PP
  1821. When you finish with all the keys, you can Save them. The definitions
  1822. for the keys you have redefined will be written into the [terminal:TERM]
  1823. section of your ~/.mc/ini file (where TERM is the name of your current
  1824. terminal). The definitions of the keys that were already working properly
  1825. are not saved.
  1826. .\"NODE " Virtual FS"
  1827. .SH " Virtual FS"
  1828. This option gives you control over the settings of the
  1829. .\"LINK2"
  1830. Virtual File System\&.
  1831. .\"Virtual File System"
  1832. .PP
  1833. The Midnight Commander keeps in memory the information related to some
  1834. of the virtual file systems to speed up the access to the files in the
  1835. file system (for example, directory listings fetched from FTP servers).
  1836. .PP
  1837. Also, in order to access the contents of compressed files (for example,
  1838. compressed tar files) the Midnight Commander needs to create temporary
  1839. uncompressed files on your disk.
  1840. .PP
  1841. Since both the information in memory and the temporary files on disk
  1842. take up resources, you may want to tune the parameters of the cached
  1843. information to decrease your resource usage or to maximize the speed of
  1844. access to frequently used file systems.
  1845. .PP
  1846. Because of the format of the tar archives, the
  1847. .I Tar filesystem
  1848. needs to read the whole file just to load the file entries. Since most
  1849. tar files are usually kept compressed (plain tar files are species in
  1850. extinction), the tar file system has to uncompress the file on the disk
  1851. in a temporary location and then access the uncompressed file as a
  1852. regular tar file.
  1853. .PP
  1854. Now, since we all love to browse files and tar files all over the disk,
  1855. it's common that you will leave a tar file and the re-enter it later.
  1856. Since decompression is slow, the Midnight Commander will cache the
  1857. information in memory for a limited time. When the timeout expires, all
  1858. the resources associated with the file system are released. The default
  1859. timeout is set to one minute.
  1860. .PP
  1861. The
  1862. .\"LINK2"
  1863. FTP File System
  1864. .\"FTP File System"
  1865. (ftpfs) allows you to browse directories on remote FTP servers. It has
  1866. several options.
  1867. .PP
  1868. .I ftp anonymous password
  1869. is the password used when you login as "anonymous". Some sites require
  1870. a valid e-mail address. On the other hand, you probably don't want to
  1871. give your real e-mail address to untrusted sites, especially if you are
  1872. not using spam filtering.
  1873. .PP
  1874. ftpfs keeps the directory listing it fetches from a FTP server in a cache.
  1875. The cache expire time is configurable with the
  1876. .I ftpfs directory cache timeout
  1877. option. A low value for this option may slow down every operation on
  1878. the ftpfs because every operation would require sending a request to the
  1879. FTP server.
  1880. .PP
  1881. You can define an FTP proxy host for doing FTP. Note that most modern
  1882. firewalls are fully transparent at least for passive FTP (see below), so
  1883. FTP proxies are considered obsolete.
  1884. .PP
  1885. If
  1886. .I Always use ftp proxy
  1887. is not set, you can use the exclamation sign to enable proxy for certain
  1888. hosts. See
  1889. .\"LINK2"
  1890. FTP File System
  1891. .\"FTP File System"
  1892. for examples.
  1893. .PP
  1894. If this option is set, the program will do two things: consult the
  1895. @prefix@/lib/mc/mc.no_proxy file for lines containing host names that
  1896. are local (if the host name starts with a dot, it is assumed to be a
  1897. domain) and to assume that any hostnames without dots in their names are
  1898. directly accessible. All other hosts will be accessed through the
  1899. specified FTP proxy.
  1900. .PP
  1901. You can enable using
  1902. .I ~/.netrc
  1903. file, which keeps login names and passwords for ftp servers. See netrc
  1904. (5) for the description of the .netrc format.
  1905. .PP
  1906. .I Use passive mode
  1907. enables using FTP passive mode, when the connection for data transfer is
  1908. initiated by the client, not by the server. This option is recommended
  1909. and enabled by default. If this option is turned off, the data
  1910. connection is initiated by the server. This may not work with some
  1911. firewalls.
  1912. .\"NODE " Save Setup"
  1913. .SH " Save Setup"
  1914. At startup the Midnight Commander will try to load initialization
  1915. information from the ~/.mc/ini file. If this file doesn't exist, it will
  1916. load the information from the system-wide configuration file, located in
  1917. @prefix@/share/mc/mc.ini. If the system-wide configuration file doesn't
  1918. exist, MC uses the default settings.
  1919. .PP
  1920. The
  1921. .I Save Setup
  1922. command creates the ~/.mc/ini file by saving the current settings
  1923. of the
  1924. .\"LINK2"
  1925. Left, Right
  1926. .\"Left and Right Menus"
  1927. and
  1928. .\"LINK2"
  1929. Options
  1930. .\"Options Menu"
  1931. menus.
  1932. .PP
  1933. If you activate the
  1934. .I auto save setup
  1935. option, MC will always save the current settings when exiting.
  1936. .PP
  1937. There also exist settings which can't be changed from the menus. To
  1938. change these settings you have to edit the setup file with your
  1939. favorite editor. See the section on
  1940. .\"LINK2"
  1941. Special Settings
  1942. .\"Special Settings"
  1943. for more information.
  1944. .SH ""
  1945. .\"NODE "Executing operating system commands"
  1946. .SH "Executing operating system commands"
  1947. You may execute commands by typing them directly in the Midnight
  1948. Commander's input line, or by selecting the program you want to
  1949. execute with the selection bar in one of the panels and hitting Enter.
  1950. .PP
  1951. If you press Enter over a file that is not executable, the Midnight
  1952. Commander checks the extension of the selected file against the
  1953. extensions in the
  1954. .\"LINK2"
  1955. Extensions File\&.
  1956. .\"Extension File Edit"
  1957. If a match is found then the code associated with that extension is
  1958. executed. A very simple
  1959. .\"LINK2"
  1960. macro expansion
  1961. .\"Macro Substitution"
  1962. takes place before executing the command.
  1963. .\"NODE " The cd internal command"
  1964. .SH " The cd internal command"
  1965. The
  1966. .I cd
  1967. command is interpreted by the Midnight Commander, it is not passed to
  1968. the command shell for execution. Thus it may not handle all of the
  1969. nice macro expansion and substitution that your shell does, although it
  1970. does some of them:
  1971. .PP
  1972. .I Tilde substitution.
  1973. The (~) will be substituted with your home directory, if you append a
  1974. username after the tilde, then it will be substituted with the login
  1975. directory of the specified user.
  1976. .PP
  1977. For example, ~guest is the home directory for the user guest, while
  1978. ~/guest is the directory guest in your home directory.
  1979. .PP
  1980. .I Previous directory.
  1981. You can jump to the directory you were previously by using the special
  1982. directory name '-' like this:
  1983. .B cd -
  1984. .PP
  1985. .I CDPATH directories.
  1986. If the directory specified to the
  1987. .B cd
  1988. command is not in the current directory, then The Midnight Commander
  1989. uses the value in the environment variable
  1990. .B CDPATH
  1991. to search for the directory in any of the named directories.
  1992. .PP
  1993. For example you could set your
  1994. .B CDPATH
  1995. variable to ~/src:/usr/src, allowing you to change your directory to
  1996. any of the directories inside the ~/src and /usr/src directories, from
  1997. any place in the file system by using its relative name (for example
  1998. cd linux could take you to /usr/src/linux).
  1999. .\"NODE " Macro Substitution"
  2000. .SH " Macro Substitution"
  2001. When accessing a
  2002. .\"LINK2"
  2003. user menu\&,
  2004. .\"Menu File Edit"
  2005. or executing an
  2006. .\"LINK2"
  2007. extension dependent command\&,
  2008. .\"Extension File Edit"
  2009. or running a command from the command line input, a simple macro
  2010. substitution takes place.
  2011. .PP
  2012. The macros are:
  2013. .TP
  2014. .I %i
  2015. The indent of blank space, equal the cursor column position. For edit
  2016. menu only.
  2017. .TP
  2018. .I %y
  2019. The syntax type of current file. For edit menu only.
  2020. .TP
  2021. .I %k
  2022. The block file name.
  2023. .TP
  2024. .I %e
  2025. The error file name.
  2026. .TP
  2027. .I %m
  2028. The current menu name.
  2029. .TP
  2030. .IR %f " and " %p
  2031. The current file name.
  2032. .TP
  2033. .I %x
  2034. The extension of current file name.
  2035. .TP
  2036. .I %b
  2037. The current file name without extension.
  2038. .TP
  2039. .I %d
  2040. The current directory name.
  2041. .TP
  2042. .I %F
  2043. The current file in the unselected panel.
  2044. .TP
  2045. .I %D
  2046. The directory name of the unselected panel.
  2047. .TP
  2048. .I %t
  2049. The currently tagged files.
  2050. .TP
  2051. .I %T
  2052. The tagged files in the unselected panel.
  2053. .TP
  2054. .IR %u " and " %U
  2055. Similar to the %t and %T macros, but in addition the files are untagged.
  2056. You can use this macro only once per menu file entry or extension file
  2057. entry, because next time there will be no tagged files.
  2058. .TP
  2059. .IR %s " and " %S
  2060. The selected files: The tagged files if there are any. Otherwise the
  2061. current file.
  2062. .TP
  2063. .I %cd
  2064. This is a special macro that is used to change the current directory
  2065. to the directory specified in front of it. This is used primarily as
  2066. an interface to the
  2067. .\"LINK2"
  2068. Virtual File System\&.
  2069. .\"Virtual File System"
  2070. .TP
  2071. .I %view
  2072. This macro is used to invoke the internal viewer. This macro can be
  2073. used alone, or with arguments. If you pass any arguments to this
  2074. macro, they should be enclosed in brackets.
  2075. .IP
  2076. The arguments are:
  2077. .I ascii
  2078. to force the viewer into ascii mode;
  2079. .I hex
  2080. to force the viewer into hex mode;
  2081. .I nroff
  2082. to tell the viewer that it should interpret the bold and underline
  2083. sequences of nroff;
  2084. .I unformatted
  2085. to tell the viewer to not interpret nroff commands for making the text
  2086. bold or underlined.
  2087. .TP
  2088. .I %%
  2089. The % character
  2090. .TP
  2091. .I %{some text}
  2092. Prompt for the substitution. An input box is shown and the text inside
  2093. the braces is used as a prompt. The macro is substituted by the text
  2094. typed by the user. The user can press ESC or F10 to cancel. This macro
  2095. doesn't work on the command line yet.
  2096. .TP
  2097. .I %var{ENV:default}
  2098. If environment variable
  2099. .I ENV
  2100. is unset, the
  2101. .I default
  2102. is substituted. Otherwise, the value of
  2103. .I ENV
  2104. is substituted.
  2105. .\"NODE " The subshell support"
  2106. .SH " The subshell support"
  2107. The subshell support is a compile time option, that works with the
  2108. shells: bash, tcsh and zsh.
  2109. .PP
  2110. When the subshell code is activated the Midnight Commander will
  2111. spawn a concurrent copy of your shell (the one defined in the
  2112. .B SHELL
  2113. variable and if it is not defined, then the one in the /etc/passwd
  2114. file) and run it in a pseudo terminal, instead of invoking a new shell
  2115. each time you execute a command, the command will be passed to the
  2116. subshell as if you had typed it. This also allows you to change the
  2117. environment variables, use shell functions and define aliases that are
  2118. valid until you quit the Midnight Commander.
  2119. .PP
  2120. If you are using
  2121. .B bash
  2122. you can specify startup
  2123. commands for the subshell in your ~/.mc/bashrc file and
  2124. special keyboard maps in the ~/.mc/inputrc file.
  2125. .B tcsh
  2126. users may specify startup commands in the ~/.mc/tcshrc file.
  2127. .PP
  2128. When the subshell code is used, you can suspend applications at any
  2129. time with the sequence C-o and jump back to the Midnight Commander, if
  2130. you interrupt an application, you will not be able to run other
  2131. external commands until you quit the application you interrupted.
  2132. .PP
  2133. An extra added feature of using the subshell is that the prompt
  2134. displayed by the Midnight Commander is the same prompt that you are
  2135. currently using in your shell.
  2136. .PP
  2137. The
  2138. .\"LINK2"
  2139. OPTIONS
  2140. .\"OPTIONS"
  2141. section has more information on how you can control the subshell code.
  2142. .\"NODE "Chmod"
  2143. .SH "Chmod"
  2144. The Chmod window is used to change the attribute bits in a group of
  2145. files and directories. It can be invoked with the C-x c key combination.
  2146. .PP
  2147. The Chmod window has two parts -
  2148. .I Permissions
  2149. and
  2150. .IR File .
  2151. .PP
  2152. In the File section are displayed the name of the file or directory
  2153. and its permissions in octal form, as well as its owner and group.
  2154. .PP
  2155. In the Permissions section there is a set of check buttons which
  2156. correspond to the file attribute bits. As you change the attribute
  2157. bits, you can see the octal value change in the File section.
  2158. .PP
  2159. To move between the widgets (buttons and check buttons) use the
  2160. .I arrow keys
  2161. or the
  2162. .I Tab
  2163. key. To change the state of the check buttons or to select a button
  2164. use
  2165. .I Space.
  2166. You can also use the hotkeys on the buttons to quickly activate them.
  2167. Hotkeys are shown as highlighted letters on the buttons.
  2168. .PP
  2169. To set the attribute bits, use the Enter key.
  2170. .PP
  2171. When working with a group of files or directories, you just click on
  2172. the bits you want to set or clear. Once you have selected the bits
  2173. you want to change, you select one of the action buttons (Set marked
  2174. or Clear marked).
  2175. .PP
  2176. Finally, to set the attributes exactly to those specified, you can use
  2177. the
  2178. .B [Set all]
  2179. button, which will act on all the tagged files.
  2180. .PP
  2181. .B [Marked all]
  2182. set only marked attributes to all selected files
  2183. .PP
  2184. .B [Set marked]
  2185. set marked bits in attributes of all selected files
  2186. .PP
  2187. .B [Clean marked]
  2188. clear marked bits in attributes of all selected files
  2189. .PP
  2190. .B [Set]
  2191. set the attributes of one file
  2192. .PP
  2193. .B [Cancel]
  2194. cancel the Chmod command
  2195. .\"NODE "Chown"
  2196. .SH "Chown"
  2197. The Chown command is used to change the owner/group of a file. The hot
  2198. key for this command is C-x o.
  2199. .\"NODE "Advanced Chown"
  2200. .SH "Advanced Chown"
  2201. The Advanced Chown command is the
  2202. .\"LINK2"
  2203. Chmod
  2204. .\"Chmod"
  2205. and
  2206. .\"LINK2"
  2207. Chown
  2208. .\"Chown"
  2209. command combined into one window. You can change the permissions and
  2210. owner/group of files at once.
  2211. .\"NODE "File Operations"
  2212. .SH "File Operations"
  2213. When you copy, move or delete files the Midnight Commander shows the
  2214. file operations dialog. It shows the files currently being processed
  2215. and uses up to three progress bars. The file bar indicates the
  2216. percentage of the current file that has been processed so far. The
  2217. count bar shows how many of the tagged files have been handled. The
  2218. bytes bar indicates the percentage of the total size of the tagged files
  2219. that has been handled. If the verbose option is off, the file and bytes
  2220. bars are not shown.
  2221. .PP
  2222. There are two buttons at the bottom of the dialog. Pressing the Skip
  2223. button will skip the rest of the current file. Pressing the Abort
  2224. button will abort the whole operation, the rest of the files are
  2225. skipped.
  2226. .PP
  2227. There are three other dialogs which you can run into during the file
  2228. operations.
  2229. .PP
  2230. The error dialog informs about error conditions and has three choices.
  2231. Normally you select either the Skip button to skip the file or the Abort
  2232. button to abort the operation altogether. You can also select the Retry
  2233. button if you fixed the problem from another terminal.
  2234. .PP
  2235. The replace dialog is shown when you attempt to copy or move a file on
  2236. the top of an existing file. The dialog shows the dates and sizes of
  2237. the both files. Press the Yes button to overwrite the file, the No
  2238. button to skip the file, the All button to overwrite all the files, the
  2239. None button to never overwrite and the Update button to overwrite if the
  2240. source file is newer than the target file. You can abort the whole
  2241. operation by pressing the Abort button.
  2242. .PP
  2243. The recursive delete dialog is shown when you try to delete a directory
  2244. which is not empty. Press the Yes button to delete the directory
  2245. recursively, the No button to skip the directory, the All button to
  2246. delete all the directories and the None button to skip all the non-empty
  2247. directories. You can abort the whole operation by pressing the Abort
  2248. button. If you selected the Yes or All button you will be asked for a
  2249. confirmation. Type "yes" only if you are really sure you want to do the
  2250. recursive delete.
  2251. .PP
  2252. If you have tagged files and perform an operation on them only the files
  2253. on which the operation succeeded are untagged. Failed and skipped files
  2254. are left tagged.
  2255. .\"NODE "Mask Copy/Rename"
  2256. .SH "Mask Copy/Rename"
  2257. The copy/move operations let you translate the names of files in an
  2258. easy way. To do it, you have to specify the correct source mask and
  2259. usually in the trailing part of the destination specify some wildcards.
  2260. All the files matching the source mask are copied/renamed according to
  2261. the target mask. If there are tagged files, only the tagged files
  2262. matching the source mask are renamed.
  2263. .PP
  2264. There are other options which you can set:
  2265. .PP
  2266. .B Follow links
  2267. .PP
  2268. determines whether make the symlinks and hardlinks in the source
  2269. directory (recursively in subdirectories) new links in the target
  2270. directory or whether would you like to copy their content.
  2271. .PP
  2272. .B Dive into subdirs
  2273. .PP
  2274. determines the behavior when the source directory is about to be copied,
  2275. but the target directory already exists. The default action is to copy
  2276. the contents of the source directory into the target directory.
  2277. Enabling this option causes copying the source directory itself into the
  2278. target directory.
  2279. .PP
  2280. For example, you want to copy directory
  2281. .I /foo
  2282. containing file
  2283. .I bar
  2284. to
  2285. .IR /bla/foo ,
  2286. which is an already existing directory. Normally (when
  2287. .B Dive into subdirs
  2288. is not set), mc would copy file
  2289. .I /foo/bar
  2290. into the file
  2291. .IR /bla/foo/bar .
  2292. By enabling this option the
  2293. .I /bla/foo/foo
  2294. directory will be created, and
  2295. .I /foo/bar
  2296. will be copied into
  2297. .IR /bla/foo/foo/bar .
  2298. .PP
  2299. .B Preserve attributes
  2300. .PP
  2301. determines whether to preserve the permissions, timestamps and (if you
  2302. are root) the ownership of the original files. If this option is not
  2303. set, the current value of the umask will be respected.
  2304. .PP
  2305. .B Use shell patterns on
  2306. .PP
  2307. When the shell patterns option is on you can use the '*' and '?'
  2308. wildcards in the source mask. They work like they do in the shell. In
  2309. the target mask only the '*' and '\\<digit>' wildcards are allowed. The
  2310. first '*' wildcard in the target mask corresponds to the first wildcard
  2311. group in the source mask, the second '*' corresponds to the second group
  2312. and so on. The '\\1' wildcard corresponds to the first wildcard group
  2313. in the source mask, the '\\2' wildcard corresponds to the second group
  2314. and so on all the way up to '\\9'. The '\\0' wildcard is the whole
  2315. filename of the source file.
  2316. .PP
  2317. Two examples:
  2318. .PP
  2319. If the source mask is "*.tar.gz", the destination is "/bla/*.tgz" and the
  2320. file to be copied is "foo.tar.gz", the copy will be "foo.tgz" in "/bla".
  2321. .PP
  2322. Suppose you want to swap basename and extension so that "file.c" would
  2323. become "c.file" and so on. The source mask for this is "*.*" and the
  2324. destination is "\\2.\\1".
  2325. .PP
  2326. .B Use shell patterns off
  2327. .PP
  2328. When the shell patterns option is off the MC doesn't do automatic
  2329. grouping anymore. You must use '\\(...\\)' expressions in the source
  2330. mask to specify meaning for the wildcards in the target mask. This is
  2331. more flexible but also requires more typing. Otherwise target masks
  2332. are similar to the situation when the shell patterns option is on.
  2333. .PP
  2334. Two examples:
  2335. .PP
  2336. If the source mask is "^\\(.*\\)\\.tar\\.gz$", the destination is
  2337. "/bla/*.tgz" and the file to be copied is "foo.tar.gz", the copy
  2338. will be "/bla/foo.tgz".
  2339. .PP
  2340. Let's suppose you want to swap basename and extension so that "file.c"
  2341. will become "c.file" and so on. The source mask for this is
  2342. "^\\(.*\\)\\.\\(.*\\)$" and the destination is "\\2.\\1".
  2343. .PP
  2344. .B Case Conversions
  2345. .PP
  2346. You can also change the case of the filenames. If you use '\\u'
  2347. or '\\l' in the target mask, the next character will be converted to
  2348. uppercase or lowercase correspondingly.
  2349. .PP
  2350. If you use '\\U' or '\\L' in the target mask, the next characters will
  2351. be converted to uppercase or lowercase correspondingly up to the
  2352. next '\\E' or next '\\U', '\\L' or the end of the file name.
  2353. .PP
  2354. The '\\u' and '\\l' are stronger than '\\U' and '\\L'.
  2355. .PP
  2356. For example, if the source mask is '*' (shell patterns on) or '^\\(.*\\)$'
  2357. (shell patterns off) and the target mask is '\\L\\u*' the file names
  2358. will be converted to have initial upper case and otherwise lower case.
  2359. .PP
  2360. You can also use '\\' as a quote character. For example, '\\\\' is
  2361. a backslash and '\\*' is an asterisk.
  2362. .\"NODE "Internal File Viewer"
  2363. .SH "Internal File Viewer"
  2364. The internal file viewer provides two display modes: ASCII and hex.
  2365. To toggle between modes, use the F4 key.
  2366. .PP
  2367. The viewer will try to use the best method provided by your system or
  2368. the file type to display the information.
  2369. Some character sequences, which appear most often in preformatted manual
  2370. pages, are displayed bold and underlined, thus making a pretty display
  2371. of your files.
  2372. .PP
  2373. When in hex mode, the search function accepts text in quotes and
  2374. constant numbers. Text in quotes is matched exactly after removing
  2375. the quotes. Each number matches one byte. You can mix quoted text
  2376. with constants like this:
  2377. .PP
  2378. .nf
  2379. "String" -1 0xBB 012 "more text"
  2380. .fi
  2381. .PP
  2382. Note that 012 is an octal number. -1 is converted to 0xFF.
  2383. .PP
  2384. Here is a listing of the actions associated with each key that the
  2385. Midnight Commander handles in the internal file viewer.
  2386. .PP
  2387. .B F1
  2388. Invoke the built-in hypertext help viewer.
  2389. .PP
  2390. .B F2
  2391. Toggle the wrap mode.
  2392. .PP
  2393. .B F4
  2394. Toggle the hex mode.
  2395. .PP
  2396. .B F5
  2397. Goto line. This will prompt you for a line number and will display
  2398. that line.
  2399. .PP
  2400. .B F6, /.
  2401. Regular expression search.
  2402. .PP
  2403. .B ?,
  2404. Reverse regular expression search.
  2405. .PP
  2406. .B F7
  2407. Normal search / hex mode search.
  2408. .PP
  2409. .B C-s, F17, n.
  2410. Start normal search if there was no previous search expression else
  2411. find next match.
  2412. .PP
  2413. .B C-r.
  2414. Start reverse search if there was no previous search expression else
  2415. find next match.
  2416. .PP
  2417. .B F8
  2418. Toggle Raw/Parsed mode: This will show the file as found on disk or if
  2419. a processing filter has been specified in the mc.ext file, then the
  2420. output from the filter. Current mode is always the other than written
  2421. on the button label, since on the button is the mode which you enter
  2422. by that key.
  2423. .PP
  2424. .B F9
  2425. Toggle the format/unformat mode: when format mode is on the viewer
  2426. will interpret some string sequences to show bold and underline with
  2427. different colors. Also, on button label is the other mode than current.
  2428. .PP
  2429. .B F10, Esc.
  2430. Exit the internal file viewer.
  2431. .PP
  2432. .B next-page, space, C-v.
  2433. Scroll one page forward.
  2434. .PP
  2435. .B prev-page, Alt-v, C-b, backspace.
  2436. Scroll one page backward.
  2437. .PP
  2438. .B down-key
  2439. Scroll one line forward.
  2440. .PP
  2441. .B up-key
  2442. Scroll one line backward.
  2443. .PP
  2444. .B C-l
  2445. Refresh the screen.
  2446. .PP
  2447. .B C-o
  2448. Switch to the subshell and show the command screen.
  2449. .PP
  2450. .B !
  2451. Like C-o, but run a new shell if the subshell is not running.
  2452. .PP
  2453. .B "[n] m"
  2454. Set the mark n.
  2455. .PP
  2456. .B "[n] r"
  2457. Jump to the mark n.
  2458. .PP
  2459. .B C-f
  2460. Jump to the next file.
  2461. .PP
  2462. .B C-b
  2463. Jump to the previous file.
  2464. .PP
  2465. .B Alt-r
  2466. Toggle the ruler.
  2467. .PP
  2468. It's possible to instruct the file viewer how to display a file, look
  2469. at the
  2470. .\"LINK2"
  2471. Extension File Edit section
  2472. .\"Extension File Edit"
  2473. .\"NODE "Internal File Editor"
  2474. .SH "Internal File Editor"
  2475. The internal file editor is a full-featured full screen editor. It can
  2476. edit files up to 64 megabytes. It is possible to edit binary files.
  2477. The internal file editor is invoked using
  2478. .B F4
  2479. if the
  2480. .I use_internal_edit
  2481. option is set in the initialization file.
  2482. .PP
  2483. The features it presently supports are: block copy, move, delete, cut,
  2484. paste; key for key undo; pull-down menus; file insertion; macro
  2485. commands; regular expression search and replace (and our own
  2486. scanf-printf search and replace); shift-arrow text highlighting (if
  2487. supported by the terminal); insert-overwrite toggle; word wrap;
  2488. autoindent; tunable tab size; syntax highlighting for various file
  2489. types; and an option to pipe text blocks through shell commands like
  2490. indent and ispell.
  2491. .PP
  2492. The editor is very easy to use and requires no tutoring. To see what
  2493. keys do what, just consult the appropriate pull-down menu. Other keys
  2494. are: Shift movement keys do text highlighting.
  2495. .B Ctrl-Ins
  2496. copies to the file
  2497. .B cooledit.clip
  2498. and
  2499. .B Shift-Ins
  2500. pastes from cooledit.clip.
  2501. .B Shift-Del
  2502. cuts to
  2503. .BR cooledit.clip ,
  2504. and
  2505. .B Ctrl-Del
  2506. deletes highlighted text. Mouse highlighting also works, and you
  2507. can override the mouse as usual by holding down the shift key
  2508. while dragging the mouse to let normal terminal mouse highlighting
  2509. work.
  2510. .PP
  2511. To define a macro, press
  2512. .B Ctrl-R
  2513. and then type out the key
  2514. strokes you want to be executed. Press
  2515. .B Ctrl-R
  2516. again when finished. You can then assign the macro to any key you
  2517. like by pressing that key. The macro is executed when you press
  2518. .B Ctrl-A
  2519. and then the assigned key. The macro is also executed if
  2520. you press Meta, Ctrl, or Esc and the assigned key, provided that the
  2521. key is not used for any other function. Once defined, the macro
  2522. commands go into the file
  2523. .B .mc/cedit/cooledit.macros
  2524. in your home directory. You can delete a macro by deleting the
  2525. appropriate line in this file.
  2526. .PP
  2527. .B F19
  2528. will format the currently highlighted block (plain text or
  2529. .B C
  2530. or
  2531. .B C++
  2532. code or another). This is controlled by the
  2533. file
  2534. .B @prefix@/share/mc/edit.indent.rc
  2535. which is copied to
  2536. .B .mc/cedit/edit.indent.rc
  2537. in your home directory the first time you use it.
  2538. .PP
  2539. You can use scanf search and replace to search and replace
  2540. a C format string. First take a look at the
  2541. .B sscanf
  2542. and
  2543. .B sprintf
  2544. man pages to see what a format string is and how it works. Consider
  2545. following example. Suppose you want to replace all occurrences of an
  2546. open bracket, three comma separated numbers, and a close bracket, with
  2547. the word
  2548. .IR apples ,
  2549. the third number, the word
  2550. .I oranges
  2551. and then the second number. Then fill in the Replace dialog box as
  2552. follows:
  2553. .PP
  2554. .nf
  2555. Enter search string:
  2556. (%d,%d,%d)
  2557. Enter replacement string:
  2558. apples %d oranges %d
  2559. Enter replacement argument order:
  2560. 3,2
  2561. .fi
  2562. .PP
  2563. The last line specifies that the third and then the second
  2564. number are to be used in place of the first and second.
  2565. .PP
  2566. It is advisable to use this feature with Prompt on replace on, because
  2567. a match is thought to be found whenever the number of arguments found
  2568. matches the number given, which is not always a real match. Scanf also
  2569. treats whitespace as being elastic. Note that the scanf format %[ is
  2570. very useful for scanning strings, and whitespace.
  2571. .PP
  2572. The editor also displays non-us characters (160+). When editing
  2573. binary files, you should set
  2574. .B display bits
  2575. to 7 bits in the options menu to keep the spacing clean.
  2576. .\"NODE "Completion"
  2577. .SH "Completion"
  2578. Let the Midnight Commander type for you.
  2579. .PP
  2580. Attempt to perform completion on the text before current position. MC
  2581. attempts completion treating the text as variable (if the text begins
  2582. with
  2583. .BR $ ),
  2584. username (if the text begins with
  2585. .BR ~ ),
  2586. hostname (if the text begins with
  2587. .BR @ )
  2588. or command (if you are on the command line in the position where you
  2589. might type a command, possible completions then include shell reserved
  2590. words and shell built-in commands as well) in turn. If none of these
  2591. matches, filename completion is attempted.
  2592. .PP
  2593. Filename, username, variable and hostname completion works on all input
  2594. lines, command completion is command line specific. If the completion
  2595. is ambiguous (there are more different possibilities), MC beeps and the
  2596. following action depends on the setting of the
  2597. .I Complete: show all
  2598. option in the
  2599. .\"LINK2"
  2600. Configuration
  2601. .\"Configuration"
  2602. dialog. If it is enabled, a list of all possibilities pops up next to
  2603. the current position and you can select with the arrow keys and
  2604. .B Enter
  2605. the correct entry. You can also type the first letters in which the
  2606. possibilities differ to move to a subset of all possibilities and
  2607. complete as much as possible. If you press
  2608. .B Alt-Tab
  2609. again, only the subset will be shown in the listbox, otherwise the first
  2610. item which matches all the previous characters will be highlighted. As
  2611. soon as there is no ambiguity, dialog disappears, but you can hide it by
  2612. canceling keys
  2613. .BR Esc ,
  2614. .B F10
  2615. and left and right arrow keys. If
  2616. .\"LINK2"
  2617. Complete: show all
  2618. .\"Configuration"
  2619. is disabled, the dialog pops up only if you press
  2620. .B Alt-Tab
  2621. for the second time, for the first time MC just beeps.
  2622. .\"NODE "Virtual File System"
  2623. .SH "Virtual File System"
  2624. The Midnight Commander is provided with a code layer to access the file
  2625. system; this code layer is known as the virtual file system switch. The
  2626. virtual file system switch allows the Midnight Commander to manipulate
  2627. files not located on the Unix file system.
  2628. .PP
  2629. Currently the Midnight Commander is packaged with some Virtual File
  2630. Systems (VFS): the
  2631. .I local
  2632. file system, used for accessing the regular Unix file system; the
  2633. .IR ftpfs ,
  2634. used to manipulate files on remote systems with the FTP protocol; the
  2635. .IR tarfs ,
  2636. used to manipulate tar and compressed tar files; the
  2637. .IR undelfs ,
  2638. used to recover deleted files on ext2 file systems (the default file
  2639. system for Linux systems),
  2640. .I fish
  2641. (for manipulating files over shell connections such as rsh and ssh) and
  2642. finally the
  2643. .I mcfs
  2644. (Midnight Commander file system), a network based file system. If the
  2645. code was compiled with
  2646. .I smbfs
  2647. support, you can manipulate files on remote systems with the SMB (CIFS)
  2648. protocol.
  2649. .PP
  2650. A generic
  2651. .I extfs
  2652. (EXTernal virtual File System) is provided in order to easily expand
  2653. VFS capabilities using scripts and external software.
  2654. .PP
  2655. The VFS switch code will interpret all of the path names used and will
  2656. forward them to the correct file system, the formats used for each one
  2657. of the file systems is described later in their own section.
  2658. .\"NODE " FTP File System"
  2659. .SH " FTP File System"
  2660. The FTP File System (ftpfs) allows you to manipulate files on remote
  2661. machines. To actually use it, you can use the
  2662. .I FTP link
  2663. item in the menu or directly change your current directory using the
  2664. .I cd
  2665. command to a path name that looks like this:
  2666. .PP
  2667. .I /#ftp:[!][user[:pass]@]machine[:port][remote-dir]
  2668. .PP
  2669. The
  2670. .IR user ,
  2671. .I port
  2672. and
  2673. .I remote-dir
  2674. elements are optional. If you specify the
  2675. .I user
  2676. element, the Midnight Commander will login to the remote machine as that
  2677. user, otherwise it will use anonymous login or the login name from the
  2678. .I ~/.netrc
  2679. file. The optional
  2680. .I pass
  2681. element is the password used for the connection. Using the password in
  2682. the VFS directory name is not recommended, because it can appear on the
  2683. screen in clear text and can be saved to the directory history.
  2684. .PP
  2685. To enable using FTP proxy, prepend
  2686. .B !
  2687. (an exclamation sign) to the hostname.
  2688. .PP
  2689. Examples:
  2690. .PP
  2691. .nf
  2692. /#ftp:ftp.nuclecu.unam.mx/linux/local
  2693. /#ftp:tsx-11.mit.edu/pub/linux/packages
  2694. /#ftp:!behind.firewall.edu/pub
  2695. /#ftp:guest@remote-host.com:40/pub
  2696. /#ftp:miguel:xxx@server/pub
  2697. .fi
  2698. .PP
  2699. Please check the
  2700. .\"LINK2"
  2701. Virtual File System
  2702. .\"Virtual FS"
  2703. dialog box for ftpfs options.
  2704. .\"NODE " Tar File System"
  2705. .SH " Tar File System"
  2706. The tar file system provides you with read-only access to your tar
  2707. files and compressed tar files by using the chdir command. To change
  2708. your directory to a tar file, you change your current directory to the
  2709. tar file by using the following syntax:
  2710. .PP
  2711. .I /filename.tar#utar/[dir-inside-tar]
  2712. .PP
  2713. The mc.ext file already provides a shortcut for tar files, this means
  2714. that usually you just point to a tar file and press return to enter
  2715. into the tar file, see the
  2716. .\"LINK2"
  2717. Extension File Edit
  2718. .\"Extension File Edit"
  2719. section for details on how this is done.
  2720. .PP
  2721. Examples:
  2722. .PP
  2723. .nf
  2724. mc-3.0.tar.gz#utar/mc-3.0/vfs
  2725. /ftp/GCC/gcc-2.7.0.tar#utar
  2726. .fi
  2727. .PP
  2728. The latter specifies the full path of the tar archive.
  2729. .\"NODE " FIle transfer over SHell filesystem"
  2730. .SH " FIle transfer over SHell filesystem"
  2731. The fish file system is a network based file system that allows you to
  2732. manipulate the files in a remote machine as if they were local. To use
  2733. this, the other side has to either run fish server, or has to have
  2734. bash-compatible shell.
  2735. .PP
  2736. To connect to a remote machine, you just need to chdir
  2737. into a special directory which name is in the following
  2738. format:
  2739. .PP
  2740. .I /#sh:[user@]machine[:options]/[remote-dir]
  2741. .PP
  2742. The
  2743. .I user,
  2744. .I options
  2745. and
  2746. .I remote-dir
  2747. elements are optional. If you specify the
  2748. .I user
  2749. element, the Midnight Commander will try to login on the remote
  2750. machine as that user, otherwise it will use your login name.
  2751. .PP
  2752. The
  2753. .I options
  2754. are 'C' - use compression and 'rsh' use rsh instead of ssh. If the
  2755. .I remote-dir
  2756. element is present, your current directory on the remote machine will be
  2757. set to this one.
  2758. .PP
  2759. Examples:
  2760. .PP
  2761. .nf
  2762. /#sh:onlyrsh.mx:r/linux/local
  2763. /#sh:joe@want.compression.edu:C/private
  2764. /#sh:joe@noncompressed.ssh.edu/private
  2765. .fi
  2766. .\"NODE " Network File System"
  2767. .SH " Network File System"
  2768. The Midnight Commander file system is a network base file system that
  2769. allows you to manipulate the files in a remote machine as if they were
  2770. local. To use this, the remote machine must be running the mcserv(8)
  2771. server program.
  2772. .PP
  2773. To connect to a remote machine, you just need to chdir into a special
  2774. directory which name is in the following format:
  2775. .PP
  2776. .I /#mc:[user@]machine[:port][remote-dir]
  2777. .PP
  2778. The
  2779. .I user, port
  2780. and
  2781. .I remote-dir
  2782. elements are optional. If you specify the
  2783. .I user
  2784. element then the Midnight Commander will try to logon on the remote
  2785. machine as that user, otherwise it will use your login name.
  2786. .PP
  2787. The
  2788. .I port
  2789. element is used when the remote server is running on a special port
  2790. (see the mcserv(8) manual page for more information about ports);
  2791. finally, if the
  2792. .I remote-dir
  2793. element is present, your current directory on the remote machine will
  2794. be set to this one.
  2795. .PP
  2796. Examples:
  2797. .PP
  2798. .nf
  2799. /#mc:ftp.nuclecu.unam.mx/linux/local
  2800. /#mc:joe@foo.edu:11321/private
  2801. .fi
  2802. .\"NODE " Undelete File System"
  2803. .SH " Undelete File System"
  2804. On Linux systems, if you asked configure to use the ext2fs undelete
  2805. facilities, you will have the undelete file system available.
  2806. Recovery of deleted files is only available on ext2 file systems. The
  2807. undelete file system is just an interface to the ext2fs library to
  2808. retrieve all of the deleted files names on an ext2fs and provides and
  2809. to extract the selected files into a regular partition.
  2810. .PP
  2811. To use this file system, you have to chdir into the special file name
  2812. formed by the "/#undel" prefix and the file name where the actual
  2813. file system resides.
  2814. .PP
  2815. For example, to recover deleted files on the second partition of the
  2816. first SCSI disk on Linux, you would use the following path name:
  2817. .PP
  2818. .nf
  2819. /#undel:sda2
  2820. .fi
  2821. .PP
  2822. It may take a while for the undelfs to load the required information
  2823. before you start browsing files there.
  2824. .\"NODE " SMB File System"
  2825. .SH " SMB File System"
  2826. The smbfs allows you to manipulate files on remote machines with SMB
  2827. (or CIFS) protocol. These include Windows for Workgroups,
  2828. Windows 9x/ME/XP, Windows NT, Windows 2000 and Samba.
  2829. To actually use it, you may try to use the panel command "SMB link..."
  2830. (accessible from the menubar) or you may directly change your current
  2831. directory to it using the cd command to a path name that looks like this:
  2832. .PP
  2833. .I /#smb:[user@]machine[/service][/remote-dir]
  2834. .PP
  2835. The
  2836. .IR user ,
  2837. .I service
  2838. and
  2839. .I remote-dir
  2840. elements are optional.
  2841. The
  2842. .IR user ,
  2843. .I domain
  2844. and
  2845. .I password
  2846. can be specified in an input dialog.
  2847. .PP
  2848. Examples:
  2849. .PP
  2850. .nf
  2851. /#smb:machine/Share
  2852. /#smb:other_machine
  2853. /#smb:guest@machine/Public/Irlex
  2854. .fi
  2855. .\"NODE " EXTernal File System"
  2856. .SH " EXTernal File System"
  2857. .B extfs
  2858. allows to integrate numerous features and file types into GNU Midnight
  2859. Commander in an easy way, by writing scripts.
  2860. .PP
  2861. Extfs filesystems can be divided into two categories:
  2862. .PP
  2863. 1. Stand-alone filesystems, which are not associated with any existing
  2864. file. They represent certain system-wide data as a directory tree.
  2865. You can invoke them by typing
  2866. .RI ' "cd #fsname" '
  2867. where fsname is an extfs short name (see below). Examples of such
  2868. filesystems include audio (list audio tracks on the CD) or apt (list of
  2869. all Debian packages in the system).
  2870. .PP
  2871. For example, to list CD-Audio tracks on your CD-ROM drive, type
  2872. .PP
  2873. .nf
  2874. cd #audio
  2875. .fi
  2876. .PP
  2877. 2. 'Archive' filesystems (like rpm, patchfs and more), which represent
  2878. contents of a file as a directory tree. It can consist of 'real' files
  2879. compressed in an archive (urar, rpm) or virtual files, like messages
  2880. in a mailbox (mailfs) or parts of a patch (patchfs). To access such
  2881. filesystems
  2882. .RI ' #fsname '
  2883. should be appended to the archive name. Note that the archive itself
  2884. can be on another vfs.
  2885. .PP
  2886. For example, to list contents of a zip archive documents.zip type
  2887. .PP
  2888. .nf
  2889. cd documents.zip#uzip
  2890. .fi
  2891. .PP
  2892. In many aspects, you could treat extfs like any other directory. For
  2893. instance, you can add it to the hotlist or change to it from directory
  2894. history. An important limitation is that you cannot invoke shell
  2895. commands inside extfs, just like any other non-local VFS.
  2896. .PP
  2897. Common extfs scripts included with Midnight Commander are:
  2898. .TP
  2899. .B a
  2900. access 'A:' DOS/Windows diskette
  2901. .RI ( "cd #a" ).
  2902. .TP
  2903. .B apt
  2904. front end to Debian's APT package management system
  2905. .RI ( "cd #apt" ).
  2906. .TP
  2907. .B audio
  2908. audio CD ripping and playing
  2909. .RI ( "cd #audio"
  2910. or
  2911. .IR "cd device#audio" ).
  2912. .TP
  2913. .B bpp
  2914. package of Bad Penguin GNU/Linux distribution
  2915. .RI ( "cd file.bpp#bpp" ).
  2916. .TP
  2917. .B deb
  2918. package of Debian GNU/Linux distribution
  2919. .RI ( "cd file.deb#deb" ).
  2920. .TP
  2921. .B dpkg
  2922. Debian GNU/Linux installed packages
  2923. .RI ( "cd #deb" ).
  2924. .TP
  2925. .B hp48
  2926. view and copy files to/from a HP48 calculator
  2927. .RI ( "cd #hp48" ).
  2928. .TP
  2929. .B lslR
  2930. browsing of lslR listings as found on many FTPs
  2931. .RI ( "cd filename#lslR" ).
  2932. .TP
  2933. .B mailfs
  2934. mbox-style mailbox files support
  2935. .RI ( "cd mailbox#mailfs" ).
  2936. .TP
  2937. .B patchfs
  2938. extfs to handle unified and context diffs
  2939. .RI ( "cd filename#patchfs" ).
  2940. .TP
  2941. .B rpm
  2942. RPM package
  2943. .RI ( "cd filename#rpm" ).
  2944. .TP
  2945. .B rpms
  2946. RPM database management
  2947. .RI ( "cd #rpms" ).
  2948. .TP
  2949. .B ulha, urar, uzip, uzoo, uar, uha
  2950. archivers
  2951. .RI ( "cd archive#xxxx"
  2952. where xxxx is one of:
  2953. .IR ulha ,
  2954. .IR urar ,
  2955. .IR uzip ,
  2956. .IR uzoo ,
  2957. .IR uar ,
  2958. .IR uha ).
  2959. .PP
  2960. You could bind file type/extension to specified extfs as described in the
  2961. .\"LINK2"
  2962. Extension File Edit
  2963. .\"Extension File Edit"
  2964. section. Here is an example entry for Debian packages:
  2965. .PP
  2966. .nf
  2967. regex/\.deb$
  2968. Open=%cd %p#deb
  2969. .fi
  2970. .\"NODE "Colors"
  2971. .SH "Colors"
  2972. The Midnight Commander will try to detect if your terminal supports
  2973. color using the terminal database and your terminal name. Sometimes
  2974. it gets confused, so you may force color mode or disable color mode
  2975. using the -c and -b flag respectively.
  2976. .PP
  2977. If the program is compiled with the Slang screen manager instead of
  2978. ncurses, it will also check the variable
  2979. .B COLORTERM,
  2980. if it is set, it has the same effect as the -c flag.
  2981. .PP
  2982. You may specify terminals that always force color mode
  2983. by adding the
  2984. .I color_terminals
  2985. variable to the Colors section of the initialization file. This will
  2986. prevent the Midnight Commander from trying to detect if your terminal
  2987. supports color. Example:
  2988. .PP
  2989. .nf
  2990. [Colors]
  2991. color_terminals=linux,xterm
  2992. color_terminals=terminal-name1,terminal-name2...
  2993. .fi
  2994. .PP
  2995. The program can be compiled with both ncurses and slang, ncurses does
  2996. not provide a way to force color mode: ncurses uses just the
  2997. information in the terminal database.
  2998. .PP
  2999. The Midnight Commander provides a way to change the default colors.
  3000. Currently the colors are configured using the environment variable
  3001. .B MC_COLOR_TABLE
  3002. or the Colors section in the initialization file.
  3003. .PP
  3004. In the Colors section, the default color map is loaded from the
  3005. .I base_color
  3006. variable. You can specify an alternate color map for a terminal by
  3007. using the terminal name as the key in this section. Example:
  3008. .PP
  3009. .nf
  3010. [Colors]
  3011. base_color=
  3012. xterm=menu=magenta:marked=,magenta:markselect=,red
  3013. .fi
  3014. .PP
  3015. The format for the color definition is:
  3016. .PP
  3017. .nf
  3018. <keyword>=<foregroundcolor>,<backgroundcolor>:<keyword>= ...
  3019. .fi
  3020. .PP
  3021. The colors are optional, and the keywords are: normal, selected, marked,
  3022. markselect, errors, input, reverse, gauge. Menu colors are: menu,
  3023. menusel, menuhot, menuhotsel. Dialog colors are: dnormal, dfocus,
  3024. dhotnormal, dhotfocus. Help colors are: helpnormal, helpitalic,
  3025. helpbold, helplink, helpslink. Viewer color is: viewunderline. Special
  3026. highlighting colors are: executable, directory, link, stalelink, device,
  3027. special, core. Editor colors are: editnormal, editbold, editmarked.
  3028. .PP
  3029. .I input
  3030. determines the color of input lines used in query dialogs.
  3031. .PP
  3032. .I gauge
  3033. determines the color of the filled part of the progress bar (gauge),
  3034. which is used to show the user the progress of file operations, such as
  3035. copying.
  3036. .PP
  3037. The dialog boxes use the following colors:
  3038. .I dnormal
  3039. is used for the normal text,
  3040. .I dfocus
  3041. is the color used for the currently selected component,
  3042. .I dhotnormal
  3043. is the color used to differentiate the hotkey color in normal
  3044. components, whereas the
  3045. .I dhotfocus
  3046. color is used for the highlighted color in the currently selected
  3047. component.
  3048. .PP
  3049. Menus use the same scheme but uses the menu, menusel, menuhot and
  3050. menuhotsel tags instead.
  3051. .PP
  3052. Help uses the following colors:
  3053. .I helpnormal
  3054. is used for normal text,
  3055. .I helpitalic
  3056. is used for text which is emphasized in italic in the manual page,
  3057. .I helpbold
  3058. is used for text which is emphasized in bold in the manual page,
  3059. .I helplink
  3060. is used for not selected hyperlinks and
  3061. .I helpslink
  3062. is used for selected hyperlink.
  3063. .PP
  3064. Special highlight colors determine how files are displayed when file
  3065. highlighting is enabled (see the section on
  3066. .\"LINK2"
  3067. Layout\&).
  3068. .\"Layout"
  3069. .I directory
  3070. is used for directories or symbolic links to directories;
  3071. .I executable
  3072. for executable files;
  3073. .I link
  3074. is used for symbolic links which are neither stale nor linked
  3075. to a directory;
  3076. .I stalelink
  3077. is used for stale symbolic links;
  3078. .I device
  3079. - character and block devices;
  3080. .I special
  3081. is used for special files, such as pipes and sockets;
  3082. .I core
  3083. is for core files.
  3084. .PP
  3085. The possible colors are: black, gray, red, brightred, green,
  3086. brightgreen, brown, yellow, blue, brightblue, magenta, brightmagenta,
  3087. cyan, brightcyan, lightgray and white. And there is a special keyword
  3088. for transparent background. It is 'default'. The 'default' can only be
  3089. used for background color. Example:
  3090. .PP
  3091. .nf
  3092. [Colors]
  3093. base_color=normal=white,default:marked=magenta,default
  3094. .fi
  3095. .\"NODE "Special Settings"
  3096. .SH "Special Settings"
  3097. Most of the settings of the Midnight Commander can be changed from the
  3098. menus. However, there are a small number of settings which can only be
  3099. changed by editing the setup file.
  3100. .PP
  3101. These variables may be set in your ~/.mc/ini file:
  3102. .TP
  3103. .I clear_before_exec
  3104. By default the Midnight Commander clears the screen before executing a
  3105. command. If you would prefer to see the output of the command at the
  3106. bottom of the screen, edit your ~/.mc/ini file and change the value of
  3107. the field clear_before_exec to 0.
  3108. .TP
  3109. .I confirm_view_dir
  3110. If you press F3 on a directory, normally MC enters that directory. If
  3111. this flag is set to 1, then MC will ask for confirmation before changing
  3112. the directory if you have files tagged.
  3113. .TP
  3114. .I ftpfs_retry_seconds
  3115. This value is the number of seconds the Midnight Commander will wait
  3116. before attempting to reconnect to an FTP server that has denied the
  3117. login. If the value is zero, the login will no be retried.
  3118. .TP
  3119. .I max_dirt_limit
  3120. Specifies how many screen updates can be skipped at most in the internal
  3121. file viewer. Normally this value is not significant, because the code
  3122. automatically adjusts the number of updates to skip according to the
  3123. rate of incoming keystrokes. However, on very slow machines or
  3124. terminals with a fast keyboard auto repeat, a big value can make screen
  3125. updates too jumpy.
  3126. .IP
  3127. It seems that setting max_dirt_limit to 10 causes the best behavior,
  3128. and that is the default value.
  3129. .TP
  3130. .I mouse_move_pages
  3131. Controls whenever scrolling with the mouse is done by pages or line by
  3132. line on the panels.
  3133. .TP
  3134. .I mouse_move_pages_viewer
  3135. Controls if scrolling with the mouse is done by pages or line by line
  3136. on the internal file viewer.
  3137. .TP
  3138. .I old_esc_mode
  3139. By default the Midnight Commander treats the ESC key as a key prefix
  3140. (old_esc_mode=0). If this option is set (old_esc_mode=1), the ESC key
  3141. will act as a prefix key for one second, and if no extra keys have
  3142. arrived, then the ESC key is interpreted as a cancel key (ESC ESC).
  3143. .TP
  3144. .I only_leading_plus_minus
  3145. Allow special treatment for '+', '-', '*' in the command line (select,
  3146. unselect, reverse selection) only if the command line is empty. You
  3147. don't need to quote those characters in the middle of the command line.
  3148. On the other hand, you cannot use them to change selection when the
  3149. command line is not empty.
  3150. .TP
  3151. .I panel_scroll_pages
  3152. If set (the default), panel will scroll by half the display when the
  3153. cursor reaches the end or the beginning of the panel, otherwise it
  3154. will just scroll a file at a time.
  3155. .TP
  3156. .I show_output_starts_shell
  3157. This variable only works if you are not using the subshell support.
  3158. When you use the C-o keystroke to go back to the user screen, if this
  3159. one is set, you will get a fresh shell. Otherwise, pressing any key
  3160. will bring you back to the Midnight Commander.
  3161. .TP
  3162. .I torben_fj_mode
  3163. If this flag is set, then the home and end keys will work slightly
  3164. different on the panels, instead of moving the selection to the first
  3165. and last files in the panels, they will act as follows:
  3166. .IP
  3167. The home key will: Go up to the middle line, if below it; else go to the
  3168. top line unless it is already on the top line, in this case it will go
  3169. to the first file in the panel.
  3170. .IP
  3171. The end key has a similar behavior: Go down to the middle line, if over
  3172. it; else go to the bottom line unless you already are at the bottom
  3173. line, in such case it will move the selection to the last file name in
  3174. the panel.
  3175. .TP
  3176. .I use_file_to_guess_type
  3177. If this variable is on (the default) it will spawn the file command to
  3178. match the file types listed on the
  3179. .\"LINK2"
  3180. mc.ext file\&.
  3181. .\"Extension File Edit"
  3182. .TP
  3183. .I xterm_mode
  3184. If this variable is on (default is off) when you browse the file system
  3185. on a Tree panel, it will automatically reload the other panel with the
  3186. contents of the selected directory.
  3187. .TP
  3188. .I fish_directory_timeout
  3189. This variable holds the lifetime of a directory cache entry in seconds. The
  3190. default value is 900 seconds.
  3191. .\"NODE "Terminal databases"
  3192. .SH "Terminal databases"
  3193. The Midnight Commander provides a way to fix your system terminal
  3194. database without requiring root privileges. The Midnight Commander
  3195. searches in the system initialization file (the mc.lib file located in
  3196. the Midnight Commander library directory) and in the ~/.mc/ini file for
  3197. the section "terminal:your-terminal-name" and then for the section
  3198. "terminal:general", each line of the section contains a key symbol that
  3199. you want to define, followed by an equal sign and the definition for the
  3200. key. You can use the special \\e form to represent the escape character
  3201. and the ^x to represent the control-x character.
  3202. .PP
  3203. The possible key symbols are:
  3204. .PP
  3205. .nf
  3206. f0 to f20 Function keys f0-f20
  3207. bs backspace
  3208. home home key
  3209. end end key
  3210. up up arrow key
  3211. down down arrow key
  3212. left left arrow key
  3213. right right arrow key
  3214. pgdn page down key
  3215. pgup page up key
  3216. insert the insert character
  3217. delete the delete character
  3218. complete to do completion
  3219. .fi
  3220. .PP
  3221. For example, to define the key insert to be the Escape + [ + O + p, you
  3222. set this in the ini file:
  3223. .PP
  3224. .nf
  3225. insert=\\e[Op
  3226. .fi
  3227. .PP
  3228. The
  3229. .I complete
  3230. key symbol represents the escape sequences used to invoke the completion
  3231. process, this is invoked with Alt-tab, but you can define other keys to do
  3232. the same work (on those keyboard with tons of nice and unused keys
  3233. everywhere).
  3234. .SH ""
  3235. .\"NODE "FILES"
  3236. .SH "FILES"
  3237. Full paths below may vary between installations. They are also affected
  3238. by the MC_DATADIR environment variable. If it's set, its value is used
  3239. instead of @prefix@/share/mc in the paths below.
  3240. .PP
  3241. .I @prefix@/share/mc/mc.hlp
  3242. .IP
  3243. The help file for the program.
  3244. .PP
  3245. .I @prefix@/share/mc/mc.ext
  3246. .IP
  3247. The default system-wide extensions file.
  3248. .PP
  3249. .I ~/.mc/bindings
  3250. .IP
  3251. User's own extension, view configuration and edit configuration
  3252. file. They override the contents of the system wide files if present.
  3253. .PP
  3254. .I @prefix@/share/mc/mc.ini
  3255. .IP
  3256. The default system-wide setup for the Midnight Commander, used only if
  3257. the user doesn't have his own ~/.mc/ini file.
  3258. .PP
  3259. .I @prefix@/share/mc/mc.lib
  3260. .IP
  3261. Global settings for the Midnight Commander. Settings in this file
  3262. affect all users, whether they have ~/.mc/ini or not. Currently, only
  3263. .\"LINK2"
  3264. terminal settings
  3265. .\"Terminal databases"
  3266. are loaded from mc.lib.
  3267. .PP
  3268. .I ~/.mc/ini
  3269. .IP
  3270. User's own setup. If this file is present then the setup is loaded
  3271. from here instead of the system-wide startup file.
  3272. .PP
  3273. .I @prefix@/share/mc/mc.hint
  3274. .IP
  3275. This file contains the hints displayed by the program.
  3276. .PP
  3277. .I @prefix@/share/mc/mc.menu
  3278. .IP
  3279. This file contains the default system-wide applications menu.
  3280. .PP
  3281. .I ~/.mc/menu
  3282. .IP
  3283. User's own application menu. If this file is present it is used instead
  3284. of the system-wide applications menu.
  3285. .PP
  3286. .I ~/.mc/Tree
  3287. .IP
  3288. The directory list for the directory tree and tree view features.
  3289. .PP
  3290. .I ./.mc.menu
  3291. .IP
  3292. Local user-defined menu. If this file is present, it is used instead of
  3293. the home or system-wide applications menu.
  3294. .\"SKIP_SECTION"
  3295. .SH "LICENSE"
  3296. This program is distributed under the terms of the GNU General Public
  3297. License as published by the Free Software Foundation. See the built-in
  3298. help for details on the License and the lack of warranty.
  3299. .\"NODE "AVAILABILITY"
  3300. .SH "AVAILABILITY"
  3301. The latest version of this program can be found at
  3302. ftp://ftp.gnu.org/gnu/mc/.
  3303. .\"NODE "SEE ALSO"
  3304. .SH "SEE ALSO"
  3305. ed(1), gpm(1), mcserv(8), terminfo(1), view(1), sh(1), bash(1),
  3306. tcsh(1), zsh(1).
  3307. .PP
  3308. .nf
  3309. The Midnight Commander page on the World Wide Web:
  3310. http://www.midnight-commander.org/
  3311. .fi
  3312. .\"NODE "AUTHORS"
  3313. .SH "AUTHORS"
  3314. Authors and contributors are listed in the AUTHORS file in the source
  3315. distribution.
  3316. .\"NODE "BUGS"
  3317. .SH "BUGS"
  3318. See the file TODO in the distribution for information on what remains to
  3319. be done.
  3320. .PP
  3321. If you want to report a problem with the program, please send mail to
  3322. this address: mc-devel@gnome.org.
  3323. .PP
  3324. Provide a detailed description of the bug, the version of the program
  3325. you are running
  3326. .RI ( "mc -V"
  3327. displays this information), the operating system you are running the
  3328. program on. If the program crashes, we would appreciate a stack trace.