Skip to main content

Midnight Commander [mc]

Miguel de Icaza's Midnight Commander (mc) README describes mc as: a free Norton Commander Clone with many useful features... The Midnight Commander is a directory browsing tool which bears a certain remote resemblance to John Socha's Norton Commander for DOS.

image-1639342735087.png  Introduction

From https://midnight-commander.org/

GNU Midnight Commander is a visual file manager, licensed under GNU General Public License and therefore qualifies as Free Software. It's a feature rich full-screen text mode application that allows you to copy, move and delete files and whole directory trees, search for files and run commands in the subshell. Internal viewer and editor are included.

Midnight Commander is based on versatile text interfaces, such as Ncurses or S-Lang, which allows it to work on a regular console, inside an X Window terminal, over SSH connections and all kinds of remote shells.

image-1639342885227.png

Navigation with keyboard:
  • down arrow, Ctrl-n - move forward one line
  • up arrow, Ctrl-p - move backward one line
  • Page Down, Ctrl-v - move back one screen
  • Page Up, Alt-v - move backward one screen
  • Home, Alt-< - move to the top of the directory listing
  • End, Alt-> - move to the end of the directory listing
Tagging of multiple files

The simplest is to either click on the file or directory using the right mouse button or move the highlight bar to the file and hit [INSERT] or [CTRL+T] to tag any number of files for copy, deletion, moving, and so forth.

If the files you want can be specified by a shell pattern (such as *.tar.gz for all the gzipped tar files or foo_??.txt for foo_01.txt, foo_02.txt, foo_03.txt, etc., then you can use the following shortcuts:

"+" key

Select a group of files by pattern. This will cause a dialog box to appear in which you can enter the search pattern. Note that entering the "*" wildcard will select all the files in the directory.

"*" key

Select all the files in the directory. This has the same effect as using the + key and then entering "*"

"\" or "-" key

Unselect a group of files. A dialog box similar to that with the + key will appear; if you want to unselect all files then enter "*"
Using pathname expansion (also known as filename globbing) is a fast and powerful way to select a group of similar files.

 

Credit: Based on An Introduction to the Midnight Commander by by John M. Fisk <fiskjm[at]ctrvax.vanderbilt.edu>.