Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung | ||
admin_grundlagen:bash_eingabehilfen [2013/02/18 07:01] ingo_wichmann |
admin_grundlagen:bash_eingabehilfen [2014/09/14 22:18] carsten_strotmann [History] |
||
---|---|---|---|
Zeile 3: | Zeile 3: | ||
^Tastenkürzel/Befehl^Funktion^ | ^Tastenkürzel/Befehl^Funktion^ | ||
|↑ (Pfeil nach oben)|letzten Befehl wiederholen| | |↑ (Pfeil nach oben)|letzten Befehl wiederholen| | ||
- | |history|bisher eingegebene Befehle anzeigen| | + | |''history''|bisher eingegebene Befehle anzeigen| |
+ | |''history | grep //suchwort//''|bisher eingegebene befehle nach //suchwort// durchsuchen| | ||
+ | |''!85''|Befehl Nr. 85 erneut ausführen| | ||
+ | |''!!''|Den letzten Befehl erneut ausführen. Tipp (Ubuntu): ''sudo !!''| | ||
|''Strg'' + ''r''|history durchsuchen| | |''Strg'' + ''r''|history durchsuchen| | ||
|''Strg'' + ''c''|abbrechen| | |''Strg'' + ''c''|abbrechen| | ||
- | |''Alt'' + ''.''|letztes Argument wiederholen| | + | |''Alt'' + ''.'' oder ''ESC'' + ''.''|letztes Argument wiederholen| |
====== Eingabe vervollständigen ====== | ====== Eingabe vervollständigen ====== | ||
^Tastenkürzel/Befehl^Funktion^ | ^Tastenkürzel/Befehl^Funktion^ | ||
- | |''Tab''| angefangener Befehl wird vervollständigt| | + | |''Tab''| angefangener Befehl bzw. angefangener Dateiname wird vervollständigt| |
====== Kopieren & Einfügen ====== | ====== Kopieren & Einfügen ====== | ||
- | mit der Maus Text markieren, fügt den Text gleichzeitig in die Text-Zwischenablage ein | + | mit der linken Maustaste Text markieren, fügt den Text gleichzeitig in die Text-Zwischenablage ein: |
{{:admin_grundlagen:markierter-text.png?nolink&200|}} | {{:admin_grundlagen:markierter-text.png?nolink&200|}} | ||
+ | |||
+ | So markierten Text kann dann mit der mittleren Maustaste (bzw. Mausrad, bzw. linke und rechte Maustaste gleichzeitig) eingefügt werden. | ||
+ | (( copy&paste vom Webbrowser in die Shell kann gefährlich sein: | ||
+ | http://thejh.net/misc/website-terminal-copy-paste | ||
+ | <code html> | ||
+ | <!DOCTYPE html> | ||
+ | <html> | ||
+ | <head> | ||
+ | <title>Copy-Paste from Website to Terminal</title> | ||
+ | </head> | ||
+ | <style> | ||
+ | .codeblock { | ||
+ | background-color: lightyellow; | ||
+ | border: 1px dotted blue; | ||
+ | margin-left: 50px; | ||
+ | display: inline-block; | ||
+ | } | ||
+ | </style> | ||
+ | <body> | ||
+ | <p> | ||
+ | You surely know this: You're looking at some website with some useful | ||
+ | shell commands. However, those commands are long as hell and you know | ||
+ | you're probably not gonna need them for a few years or so (so there's | ||
+ | no need to memorize them). So, what | ||
+ | do you do? You copy-paste them. Here's an example: | ||
+ | </p> | ||
+ | <p class="codeblock"> | ||
+ | <!-- Oh noes, you found it! --> | ||
+ | git clone | ||
+ | <span style="position: absolute; left: -100px; top: -100px">/dev/null; clear; echo -n "Hello ";whoami|tr -d '\n';echo -e '!\nThat was a bad idea. Don'"'"'t copy code from websites you don'"'"'t trust!<br>Here'"'"'s the first line of your /etc/passwd: ';head -n1 /etc/passwd<br>git clone </span> | ||
+ | git://git.kernel.org/pub/scm/utils/kup/kup.git | ||
+ | </p> | ||
+ | <p> | ||
+ | Try running this command in your terminal. It's supposed to be harmless, | ||
+ | right? It is harmless, yes, but what happens still isn't what you'd | ||
+ | expect and demonstrates the dangers in doing stuff like that. Mark it | ||
+ | with your mouse, copy it somehow (e.g. using CTRL+C) and paste it into | ||
+ | a terminal. What happens? | ||
+ | </p> | ||
+ | </body> | ||
+ | </html> | ||
+ | |||
+ | </code> | ||
+ | )) |