Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
5Activity
0 of .
Results for:
No results containing your search query
P. 1
Midnight Commander Guide

Midnight Commander Guide

Ratings: (0)|Views: 6,084|Likes:
Published by Henry
It a introduction to the powerful text base UI for linux server management
It a introduction to the powerful text base UI for linux server management

More info:

Published by: Henry on Aug 26, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

12/01/2012

pdf

text

original

 
Midnight Commander (mc) Guide: Powerful Textbased File Manager for Unix
Free eBook
-Linux 101 Hacks. Get your copy now.GNU Midnight Commander (mc) is a powerful text based file manager forUnix. mc gives an jumpstart for Windows power-users who would like to transition to Unix. It also has severaladvanced features to keep experienced Unix users happy. mc can run from any Unix terminal. If your terminal canexecute vi, you can execute mc to view the midnight commander user interface. Midnight commander supports mousewhen you are running it under xterm.
mc supports several virtual file systems (VFS) such as, tarfs to view the content of the several archive files (tar, tgz,bz2, rpm etc.) , ftpfs to browse FTP repositories of a remote server, fish to manipulate files on a remote server overssh, undelfs to recover a deleted file.
1. Installation
mc comes with most of the Linux distributions. Verify whether your system already has mc:
# rpm -qa mcmc-4.6.2-3.pre1.fc9.i386
If you don’t have mc, install it using yum:
# yum install mc
Execute mc -V to see all compiled options on your midnight commander:
# mc -VGNU Midnight Commander 4.6.1-pre1aVirtual File System: tarfs, extfs, cpiofs, ftpfs, fish, undelfsWith builtin EditorUsing system-installed S-Lang library with terminfo databaseWith subshell support as defaultWith support for background operationsWith mouse support on xterm and Linux consoleWith support for X11 eventsWith internationalization supportWith multiple codepages support
Note:
You can also install mc from source code. Download mc source code fromGNU FTP site.
2. Midnight Commander layout
 
Launch midnight commander user interface using one of the following methods:
# mc# mc -a[Note: If display lines are not drawn properly, use -a]# mc -c[Note: Option -c will display mc in color]
Midnight commander user interface has four sections as explained below.
Section 1 - Menu bar:
Located at the top of the screen and has the following options. Press F9 (or) Esc 9 to access themenu bar.Left - Options to control the display of the left directory panelFile - Options to manipulate filesCommand - Options to edit various mc configuration filesOptions - Options to change layout, setup VFSRight - Options to control the display of the right directory panel
Section 2 - Directory panels:
Located in the middle and occupies large part of the screen. By default, it displays bothleft and right directory browsing panels, where you can view contents of two different directories at the same time.
Section 3 - Function keys:
Located at the bottom and has following options. Press Esc key followed by thecorresponding menu number to access these functions.Help - Display in-built mc help.1.Menu - Displays user defined menu items. You can create custom menu item to execute some complex steps of 2.operations on the selected file. for e.g. compress the selected file and copy to a remote server with a single click.To edit the menu item file, click F9 (invoke menu bar) -> Command -> Edit Menu FileView - View the selected file content using mcview, a viewer for midnight commander.3.Edit - Edit the selected file using mcedit, an editor for midnight commander.4.Copy - Copy the selected file. If both panels are displayed, it will copy the file to the other panel. mc will ask for5.confirmation before doing any changes such as, copy file, delete file, move file etc.,RenMov - Move/Rename the selected file.6.Mkdir - Create a new directory under the selected directory.7.Delete - Delete the selected file.8.PullDn - This will highlight the Menu Bar. This option is helpful when F9 doesn’t work to invoke the menu bar.9.Quit - To quite midnight commander, press Esc key followed by 0.10.
 
Section 4 - Command Line prompt:
Using midnight commander does not take away the command line from poweruser. You can start typing an Unix command anytime and press enter to execute it. Command line prompt is locatedtowards the bottom of the screen.
3. Basic keyboard shortcuts
Most of the mc keyboard shortcuts fall in one of the following category:
C-<chr>:
Press Control key and a character key at the same time. For e.g.
C-u
to swap left and right panels.
M-<chr>:
Press Alt key and a character key at the same time. For Alt key commands, you can also press ESCkey, release it and press the character key.
S-<chr>:
Press Shit key and a character key at the same time.
C-<chr1> <chr2>:
Press Control key and a character key at the same time, release it and press another characterkey again. For e.g.
C-x d
to compare directories.Following are some basic keyboard operation
Tab:
To switch from one panel to another.
M-t:
Change the panel display options. i.e Switch from a dual panel display to a single panel display.
C-s:
Search for a file.Use up-arrow, down-arrow, page-up, page-down, home and end keys to browse the directory content.
4.Sample mc usage scenarios
Copy multiple files together using ‘Insert’ and F5:
Highlight a file and press ‘Insert’ key to tag the file forgroup selection. Repeat this process for multiple files that you wish to copy. Selected files will be displayed in adifferent color. Pressing F5 will display the following copy dialog screen, defaulting the destination directorylocation to the directory displayed in the other panel
Display additional file information:
To display additional file attributes in the directory panels, press F9 ->Left or Right -> Listing Mode, and select “Full File List”
View the content of any compressed file using F3
: Select the file and press F3 to view the content of the file.For e.g. Select a rpm file and press F3, to view the content of the rpm file.
Toggle between command line and mc using C-o:
Press
C-o
(Control key followed by o) to toggle betweenfull command-line and mc user interface.
Confirm file operations:
To avoid mistakes, enable confirmation for copy, delete, overwrite and executefunctions. Press F9 -> Options -> Confirmations, which will display the following screen.
5. References and additional screenshots
Additional screenshots of GNU Midnight Commander running both in a terminal and with the GNOME GUI.

Activity (5)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
calinnet40 liked this
abiza liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->