Midnight Commander (en): Unterschied zwischen den Versionen

Aus Gemini-Wiki
Zur Navigation springen Zur Suche springen
Zeile 32: Zeile 32:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
== Wichtige Tastaturkürzel ==
+
== Important shirtcuts ==
 
{|class="wikitable"
 
{|class="wikitable"
  !Tastaturkürzel / Kombinationen
+
  !Shortcut / combination
  !Auswirkung was geschieht
+
  !Action
 
  |-
 
  |-
 
  |{{Taste|F1}} .. {{Taste|F10}}
 
  |{{Taste|F1}} .. {{Taste|F10}}
  |siehe Menüleiste am unteren Bildschirmrand
+
  |see menubar at the lower screen border
 
  |-
 
  |-
 
  |{{Taste|Tab}}
 
  |{{Taste|Tab}}
  |Wechseln auf anderes Panel
+
  |Switch the active panel
 
  |-
 
  |-
 
  |{{Taste|Ctrl}}+{{Taste|o}}
 
  |{{Taste|Ctrl}}+{{Taste|o}}
  |Wegklappen der Panels, so dass der normale Bildschirminhalt sichtbar wird
+
  |Hide the panel, to see the normal screen
 
  |-
 
  |-
 
  |{{Taste|Ctrl}}+{{Taste|x}} i
 
  |{{Taste|Ctrl}}+{{Taste|x}} i
  |Infomodus im anderen Fenster
+
  |Info mode in the other panel
 
  |-
 
  |-
 
  |{{Taste|Ctrl}}+{{Taste|x}} q
 
  |{{Taste|Ctrl}}+{{Taste|x}} q
  |Quickview im anderen Fenster
+
  |Quickview in the other panel
 
  |-
 
  |-
 
  |{{Taste|Ctrl}}+{{Taste|s}} / {{Taste|Alt}}+{{Taste|s}}
 
  |{{Taste|Ctrl}}+{{Taste|s}} / {{Taste|Alt}}+{{Taste|s}}
  |Namenssuche im aktuellen Fenster
+
  |Name search in the actual panel
 
  |-
 
  |-
 
  |{{Taste|Esc}}+{{Taste|p}}
 
  |{{Taste|Esc}}+{{Taste|p}}
  |vorheriges Kommando
+
  |previous command
 
  |-
 
  |-
 
  |{{Taste|Esc}}+{{Taste|↵ Enter}}
 
  |{{Taste|Esc}}+{{Taste|↵ Enter}}
  |aktuellen Dateinamen auf Kommandozeile übernehmen
+
  |copy the actual file name on the console
 
  |-
 
  |-
 
  |{{Taste|Esc}}+{{Taste|Tab}}
 
  |{{Taste|Esc}}+{{Taste|Tab}}
  |Kommando-Vervollständigung (ggfs. auch zweimal)
+
  |Complete the command (apply twice sometimes)
 
  |-
 
  |-
 
  |{{Taste|Alt}}+{{Taste|o}}
 
  |{{Taste|Alt}}+{{Taste|o}}
  |Fenster angleichen (anderes Fenster erhält gleichen Pfad!)  
+
  |Sync panels (other panel sets the same path!)  
 
  |-
 
  |-
 
  |{{Taste|Alt}}+{{Taste|c}}
 
  |{{Taste|Alt}}+{{Taste|c}}
  |Wechsel in ein anzugebendes Verzeichnis
+
  |Change in a specified directory
 
  |-
 
  |-
 
  |{{Taste|Alt}}+{{Taste|Tab}}
 
  |{{Taste|Alt}}+{{Taste|Tab}}

Version vom 17. August 2013, 17:19 Uhr

Deutsch.png - in Deutsch English.png - in English
Midnight Commander

GNU Midnight Commander, known as mc, is a free clone of the DOS Tool Norton Commander (→twoo panels) and is one of the most famous console programs for Linux. Over a VFS it's also possible to access archives ans network servers easily.

For Linux beginners, if you have used a similar tool under DOS, Windows or OS/2, it helps with many tasks. The biggest advantage is the versatility: mouse support (GPM), integrated FTP Client, unpack different types of archives and packages (of course the programs need to be installed before) tar.gz, bzip, zip, rar, rpm, deb, ... . And yes, many operations are faster in the console using commands. But with mc it's easier, e.g. copying, deleting, ... of files which can be difficult to filter. And last but not least, the integrated editor with syntax support (for almost any language) and simple interface is a big help for new users (which might think vi is a French cheese).

As it is a console program with function keys, many operations will be performed quickly after a short learning period. Much faster as from the console with commands or with a GUI. mc is much better as GUI file managers, especially regarding speed.

The Midnight Commander on the Dreambox can be "stripped" and might have limited functions available. It's recommended to learn this tool to perform quickly many tasks without installing any software on a PC before.

Start Midnight Commander

Connect via Telnet or SSH with the Dreambox and enter following command in the console (Terminal):

mc

The Midnight Commander will be started, and looks like the image in this article...

Create or edit text files

Create file

To create a new text file or to open and edit an existing file, use the command "mcedit file_name" an example:

mcedit nas-feed.conf

now you can write your text and save the file

src/gz nas-feed http://ip_of_Webserver/dreambox

Important shirtcuts

Shortcut / combination Action
F1 .. F10 see menubar at the lower screen border
Tab Switch the active panel
Ctrl+o Hide the panel, to see the normal screen
Ctrl+x i Info mode in the other panel
Ctrl+x q Quickview in the other panel
Ctrl+s / Alt+s Name search in the actual panel
Esc+p previous command
Esc+↵ Enter copy the actual file name on the console
Esc+Tab Complete the command (apply twice sometimes)
Alt+o Sync panels (other panel sets the same path!)
Alt+c Change in a specified directory
Alt+Tab Shell-Erweiterung (nicht unter X)
Alt+? Dateisuche
Alt+t (toggle) Wechsel zw. verschiedenen Listing-Arten
+ / - select / unselect (pattern matching)
Insert Einzelne Dateien / Verzeichnisse selektieren / deselektieren
+ * ↵ Enter Alle Dateien / Verzeichnisse auswählen
- * ↵ Enter Auswahl von allen Dateien / Verzeichnissen rückgängig machen

Tipps & Tricks

Einstellungen:

  • Wer vi nicht mag, sollte den internen Editor über "Options / Configuration / Use internal edit" aktivieren.
  • Lynx-artige Bewegungen bedeutet, dass man einfach mit den Cursortasten in Verzeichnisse hinein und heraus wechseln kann.

SCP Client:

Ein SCP Zugriff ist mit folgendem Befehl möglich. Durch die Eingabe von cd kann man die Verbindung unterbrechen.

cd sh://username@domain.de/path

Alternativ kann über das Dropdownmenü [Left/Right] → [Shell Link] ein Zugriff erfolgen. Die Eingabe ist wie folgt:

username@domain.de

FTP Client:

Mit folgendem Befehl kann Midnight Commander eine Verbindung zu einem FTP Server herstellen. Midnight Commander muss natürlich gestartet sein. Durch die Eingabe von cd kann man die Verbindung unterbrechen.

cd ftp://domain.de

Passwortgeschützte FTP Server erreicht man wie folgt. Durch die Eingabe von cd kann man die Verbindung beenden.

cd ftp://username@domain.de

Wenn Midnight Commander geschlossen ist, kann ein FTP Zugriff so erfolgen.

mc ftp://username@domain.de

Alternativ kann über das Dropdownmenü [Left/Right] → [FTP Link] ein Zugriff erfolgen. Die Eingabe ist wie folgt:

username@domain.de

Aussehen / Maus Support unter OE 2.0

Ein besseres Aussehen, inklusive Maussupport, könnt ihr in einem OE 2.0 basierenden Image mit folgenden beiden Befehlen einrichten.

echo "TERM=xterm" > ~/.profile
 
source ~/.profile

Weblinks