Midnight Commander

Here are some basics for using midnight commander. See 'man mc' for much more as well as the help that is in mc itself.

Start

  • To start midnight commander type 'mc' on the commandline. mc really shines in console mode. If you are using X, you may just as well use one of the GUI file browsers.
    • If you add the paths of two directories to the command, the first is opened on the left and the second on the right.
  • To move back and forth between the two directory panels, use TAB. Having the two panels makes it easy to copy or move things from one to the other and see where you are.

Commands

Commandline on bottom

Run a normal command here. For example, cd quickly by just using the normal cd. command here

Function Key Menu on bottom

The bottom menu allows you choose to View, Edit, Copy, Move, Delete files and directories. Use the Function keys that correspond with the commands listed. F3 to View and so on. The command to Quit (F10) is also there for your convenience.

Menu on Top

  • Get there with F9
  • You can filter and find files using the top Menu. Choose Left or Right depending which Panel you want to work with and Filter under that. Find is under the Command Menu and you will see the keystrokes that you could use instead to run that command.
  • Safe Delete Choose Options and Configuration, check the last item on the right hand side, then Save. This will cause an, “are you sure”, confirmation window to popup, giving you one last chance to cancel deletes.
  • A powerful feature of mc is tagging files and then performing a command on them. Tag one file using the INSERT key. Untag it with the same key. Tag (Select) a group of files using Alt-+ or the command 'select Group' under File in the upper menu.

Hot Keys for use with MC

  • They are generally indicated in the menus
  • Alt c this will bring both left and right side panels into the same directory as the one you were in.
  • Ctrl c this toggles from the, side by side file manager view, to the commandline (in the directory from which you came)
    • Even though you can use the commandline prompt below the panels for entering commands, you will not see the actions taken place
    • Using the Ctrl c method and then entering your command at that prompt, you can watch the results of your command as it works.
    • This comes in handy when the command failed, yet you just saw nothing happened and don't know why it failed.
  • Alt-? Does Find. You can choose Panelize after the find is complete and it will list those files found in the Current Panel.

Other Uses to look for

  • With mc you can change permissions, compress directories, look at what files are in a compressed directory and more. All these things can be done with ordinary commands, but mc has it all there in one program and is menu driven.
  • My favorite use for the program is pruning directories. I can quickly see what is there and open the file to see what the text is in it. It has a pretty easy to use editor for the newbie as well. 'mcedit <filename>' will bring it up. Of course the editor is readily available from within mc.

Eye Candy for mc

You get get mc to have a transparent background and hence display a shell background (in my case, a nice image).

To add this feature to mc, create a Color section in the ini file, by adding the following 2 lines to the /home/youruser/.mc/ini file (the second line is on one line only):

[Colors]
base_color=normal=white,default:marked=magenta,default:selected=,default:markselect=,default:errors=,default:input=,default:gauge=,default:reverse=,default:menu=,default:menusel=,default:menuhot=,default:menuhotsel=,default:dnormal=,default:dfocus=,default:dhotnormal=,default:dhotfocus=,default:helpnormal=,default:helpitalic=,default:helpbold=,default:helplink=,default:helpslink=,default:viewunderline=,default:executable=,default:directory=,default:link=,default:stalelink=,default:device=,default:special=,default:core=,default:editnormal=,default:editbold=,default:editmarked=,default

I have prepared a nice picture to put here, but I don't know how to put it in the wiki!!! :-(

D. Raymond 2005/10/01 22:57

/home/www/LinuxBasics.org/data/pages/tutorials/using/midnight_commander.txt · Last modified: 2008/07/20 21:08 (external edit)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0