Files
lpic-sim/simulator/data/lpic1_101/questions_103_set2.json
T
2026-10-30 15:40:37 +01:00

714 lines
45 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"$schema": "../schema/questions.schema.json",
"format": "lpic-sim-questions",
"meta": {
"file": "questions_103_set2.json",
"brief": "Zweiter Fragensatz zu Topic 103 GNU- und Unix-Befehle (LPIC-1 101-500, Objectives 5.0)",
"author": "Björn Runden <br@runden.de>",
"owner": "Björn Runden <br@runden.de>",
"assist": "KI-unterstützt (Claude Opus 5.5), geprüft von Björn Runden <br@runden.de>",
"version": "0.1.0 (30.10.2026)"
},
"exam": "lpic1-101",
"questions": [
{
"id": "103.1-007",
"objective": "103.1",
"type": "single",
"difficulty": 1,
"question": "Wie öffnet man die Manpage zum **Dateiformat** von `/etc/passwd` statt zum Befehl `passwd`?",
"options": [
{ "id": "a", "text": "`man 5 passwd`", "correct": true, "explanation": "Abschnitt 5 enthält Dateiformate und Konventionen." },
{ "id": "b", "text": "`man passwd`", "correct": false, "explanation": "Zeigt den ersten Treffer – meist Abschnitt 1, den Befehl." },
{ "id": "c", "text": "`man 1 passwd`", "correct": false, "explanation": "Abschnitt 1 sind Benutzerbefehle." },
{ "id": "d", "text": "`man -k passwd`", "correct": false, "explanation": "Sucht nur in den Kurzbeschreibungen (wie `apropos`)." },
{ "id": "e", "text": "`man 8 passwd`", "correct": false, "explanation": "Abschnitt 8 sind Administrationsbefehle." }
],
"explanation": "Wichtige Abschnitte: 1 Befehle, 2 Systemaufrufe, 3 Bibliotheksfunktionen, 4 Gerätedateien, 5 Dateiformate, 7 Verschiedenes, 8 Administration.",
"references": ["man 1 man"]
},
{
"id": "103.1-008",
"objective": "103.1",
"type": "fill",
"difficulty": 1,
"question": "Welcher Befehl (nur der Name) durchsucht die Kurzbeschreibungen aller Manpages nach einem Stichwort – gleichwertig zu `man -k`?",
"answers": ["apropos"],
"explanation": "Die Datenbank dafür pflegt `mandb`. `whatis` zeigt die Kurzbeschreibung zu einem exakten Namen.",
"references": ["man 1 apropos"]
},
{
"id": "103.1-009",
"objective": "103.1",
"type": "single",
"difficulty": 1,
"question": "Was bewirkt `cd -` in der Bash?",
"options": [
{ "id": "a", "text": "Wechsel in das vorherige Arbeitsverzeichnis (`$OLDPWD`)", "correct": true, "explanation": "Praktisch zum Hin- und Herspringen; der neue Pfad wird ausgegeben." },
{ "id": "b", "text": "Wechsel in das Home-Verzeichnis", "correct": false, "explanation": "Das macht `cd` ohne Argument oder `cd ~`." },
{ "id": "c", "text": "Wechsel in das übergeordnete Verzeichnis", "correct": false, "explanation": "Das macht `cd ..`." },
{ "id": "d", "text": "Wechsel in das Wurzelverzeichnis", "correct": false, "explanation": "Das macht `cd /`." },
{ "id": "e", "text": "Fehlermeldung, da `-` kein Verzeichnis ist", "correct": false, "explanation": "`-` hat bei `cd` eine eigene Bedeutung." }
],
"explanation": "Das aktuelle Verzeichnis steht in `$PWD` bzw. wird mit `pwd` ausgegeben.",
"references": ["help cd"]
},
{
"id": "103.1-010",
"objective": "103.1",
"type": "single",
"difficulty": 1,
"question": "Welche Ausgabe erzeugt `echo \"Pfad: $HOME\"` für die Benutzerin `anna` mit dem Home-Verzeichnis `/home/anna`?",
"options": [
{ "id": "a", "text": "`Pfad: /home/anna`", "correct": true, "explanation": "In doppelten Anführungszeichen wird `$HOME` ersetzt; die Anführungszeichen selbst erscheinen nicht." },
{ "id": "b", "text": "`Pfad: $HOME`", "correct": false, "explanation": "So wäre es mit einfachen Anführungszeichen." },
{ "id": "c", "text": "`\"Pfad: /home/anna\"`", "correct": false, "explanation": "Die Shell entfernt die Anführungszeichen vor der Übergabe an `echo`." },
{ "id": "d", "text": "`Pfad:`", "correct": false, "explanation": "`HOME` ist gesetzt, also wird ein Wert eingesetzt." },
{ "id": "e", "text": "Eine Fehlermeldung", "correct": false, "explanation": "Der Befehl ist korrekt." }
],
"explanation": "Reihenfolge der Verarbeitung: Quoting erkennen → Expansionen → Anführungszeichen entfernen → Befehl ausführen.",
"references": ["man 1 bash (Abschnitt QUOTING)"]
},
{
"id": "103.1-011",
"objective": "103.1",
"type": "multi",
"difficulty": 2,
"question": "Im aktuellen Verzeichnis existiert eine Datei `axb`. Welche Befehle geben trotzdem genau den Text `a*b` aus?",
"options": [
{ "id": "a", "text": "`echo 'a*b'`", "correct": true, "explanation": "In einfachen Anführungszeichen findet kein Globbing statt." },
{ "id": "b", "text": "`echo a\\*b`", "correct": true, "explanation": "Der Backslash maskiert den Stern." },
{ "id": "c", "text": "`echo a*b`", "correct": false, "explanation": "Das Muster passt auf `axb` – ausgegeben wird `axb`." },
{ "id": "d", "text": "`echo $(a*b)`", "correct": false, "explanation": "Befehlsersetzung: Die Shell versucht `axb` als Befehl auszuführen." },
{ "id": "e", "text": "`echo {a*b}`", "correct": false, "explanation": "Ohne Komma keine Klammererweiterung; das Muster `{a*b}` trifft nichts, ausgegeben wird `{a*b}` mit Klammern." }
],
"explanation": "Auch `echo \"a*b\"` funktioniert: In doppelten Anführungszeichen gibt es kein Globbing.",
"references": ["man 1 bash (Abschnitt Pathname Expansion)"]
},
{
"id": "103.1-012",
"objective": "103.1",
"type": "single",
"difficulty": 1,
"question": "Mit welcher Tastenkombination durchsucht man in der Bash die History **rückwärts interaktiv**?",
"options": [
{ "id": "a", "text": "Strg+R", "correct": true, "explanation": "reverse-i-search; erneutes Strg+R springt zum nächsten älteren Treffer." },
{ "id": "b", "text": "Strg+C", "correct": false, "explanation": "Bricht den laufenden Befehl bzw. die Eingabe ab (SIGINT)." },
{ "id": "c", "text": "Strg+D", "correct": false, "explanation": "Dateiende (EOF); in einer leeren Zeile beendet es die Shell." },
{ "id": "d", "text": "Strg+Z", "correct": false, "explanation": "Hält den Vordergrundprozess an (SIGTSTP)." },
{ "id": "e", "text": "Strg+L", "correct": false, "explanation": "Leert den Bildschirm." }
],
"explanation": "Pfeil hoch/runter blättert durch die History, `history` listet sie nummeriert.",
"references": ["man 1 bash (Abschnitt READLINE)"]
},
{
"id": "103.1-013",
"objective": "103.1",
"type": "fill",
"difficulty": 1,
"question": "Welcher Befehl (nur der Name) gibt den absoluten Pfad des aktuellen Arbeitsverzeichnisses aus?",
"answers": ["pwd"],
"explanation": "print working directory; `pwd -P` löst symbolische Links auf.",
"references": ["help pwd"]
},
{
"id": "103.2-004",
"objective": "103.2",
"type": "single",
"difficulty": 1,
"question": "Eine Datei enthält die Zeilen `10`, `9` und `100`. Welcher Befehl sortiert sie **numerisch** aufsteigend (9, 10, 100)?",
"options": [
{ "id": "a", "text": "`sort -n zahlen.txt`", "correct": true, "explanation": "`-n` vergleicht den Zahlenwert." },
{ "id": "b", "text": "`sort zahlen.txt`", "correct": false, "explanation": "Lexikalisch: `10`, `100`, `9`." },
{ "id": "c", "text": "`sort -r zahlen.txt`", "correct": false, "explanation": "Lexikalisch absteigend." },
{ "id": "d", "text": "`sort -u zahlen.txt`", "correct": false, "explanation": "Entfernt Duplikate, sortiert aber lexikalisch." },
{ "id": "e", "text": "`sort -k zahlen.txt`", "correct": false, "explanation": "`-k` erwartet eine Feldangabe." }
],
"explanation": "Kombinierbar: `sort -t: -k3 -n /etc/passwd` sortiert nach UID.",
"references": ["man 1 sort"]
},
{
"id": "103.2-005",
"objective": "103.2",
"type": "fill",
"difficulty": 1,
"question": "Welcher Befehl (nur der Name) gibt eine Datei in umgekehrter Zeilenreihenfolge aus (letzte Zeile zuerst)?",
"answers": ["tac"],
"explanation": "`tac` ist `cat` rückwärts. Zeichen innerhalb einer Zeile umkehren würde `rev`.",
"references": ["man 1 tac"]
},
{
"id": "103.2-006",
"objective": "103.2",
"type": "single",
"difficulty": 1,
"question": "Welcher Befehl wandelt alle Kleinbuchstaben in `namen.txt` in Großbuchstaben um?",
"options": [
{ "id": "a", "text": "`tr 'a-z' 'A-Z' < namen.txt`", "correct": true, "explanation": "`tr` liest nur von stdin und ersetzt Zeichen der ersten Menge durch die der zweiten." },
{ "id": "b", "text": "`tr 'A-Z' 'a-z' < namen.txt`", "correct": false, "explanation": "Umgekehrte Richtung: Groß- zu Kleinbuchstaben." },
{ "id": "c", "text": "`tr -d 'a-z' < namen.txt`", "correct": false, "explanation": "`-d` löscht die Kleinbuchstaben." },
{ "id": "d", "text": "`tr 'a-z' 'A-Z' namen.txt`", "correct": false, "explanation": "`tr` nimmt keine Dateinamen an; die Datei würde als weitere Zeichenmenge gelesen." },
{ "id": "e", "text": "`cut -c A-Z namen.txt`", "correct": false, "explanation": "`cut -c` erwartet Zeichenpositionen." }
],
"explanation": "Mit Klassen: `tr '[:lower:]' '[:upper:]'`. `tr -s ' '` fasst Leerzeichen zusammen.",
"references": ["man 1 tr"]
},
{
"id": "103.2-007",
"objective": "103.2",
"type": "multi",
"difficulty": 2,
"question": "Welche Aussagen zu Prüfsummen-Werkzeugen treffen zu?",
"options": [
{ "id": "a", "text": "`sha256sum datei.iso` berechnet die SHA-256-Prüfsumme der Datei.", "correct": true, "explanation": "Ausgabe: Hash und Dateiname." },
{ "id": "b", "text": "`sha256sum -c SHA256SUMS` prüft Dateien gegen eine Liste von Prüfsummen.", "correct": true, "explanation": "Meldet je Datei `OK` oder `FAILED`." },
{ "id": "c", "text": "`md5sum` gilt heute als kryptografisch sicher gegen gezielte Manipulation.", "correct": false, "explanation": "MD5 ist gebrochen; für Integrität gegen Angreifer SHA-256/SHA-512 nutzen." },
{ "id": "d", "text": "`wc -c` berechnet eine Prüfsumme.", "correct": false, "explanation": "`wc -c` zählt Bytes." },
{ "id": "e", "text": "`nl` verschlüsselt eine Datei.", "correct": false, "explanation": "`nl` nummeriert Zeilen." }
],
"explanation": "Im Objective genannt: `md5sum`, `sha256sum`, `sha512sum`. Weitere Filter: `nl`, `od`, `paste`, `split`, `zcat`, `xzcat`, `bzcat`.",
"references": ["man 1 sha256sum"]
},
{
"id": "103.3-007",
"objective": "103.3",
"type": "single",
"difficulty": 1,
"question": "Welcher Befehl legt `projekt/2026/oktober` an, auch wenn `projekt` und `projekt/2026` noch nicht existieren?",
"options": [
{ "id": "a", "text": "`mkdir -p projekt/2026/oktober`", "correct": true, "explanation": "`-p` (parents) legt fehlende übergeordnete Verzeichnisse mit an und meldet keinen Fehler, wenn sie existieren." },
{ "id": "b", "text": "`mkdir projekt/2026/oktober`", "correct": false, "explanation": "Scheitert, wenn ein übergeordnetes Verzeichnis fehlt." },
{ "id": "c", "text": "`mkdir -r projekt/2026/oktober`", "correct": false, "explanation": "`mkdir` hat keine Option `-r`." },
{ "id": "d", "text": "`touch -d projekt/2026/oktober`", "correct": false, "explanation": "`touch -d` setzt einen Zeitstempel aus einer Datumsangabe." },
{ "id": "e", "text": "`cp -r projekt/2026/oktober`", "correct": false, "explanation": "`cp` kopiert und braucht ein Ziel." }
],
"explanation": "`mkdir -m 750 dir` setzt die Rechte direkt beim Anlegen.",
"references": ["man 1 mkdir"]
},
{
"id": "103.3-008",
"objective": "103.3",
"type": "fill",
"difficulty": 2,
"question": "Welcher `find`-Test (Option mit Wert) wählt Dateien aus, deren Inhalt vor **weniger als 2 Tagen** geändert wurde?",
"answers": ["-mtime -2"],
"explanation": "`-mtime n` zählt in 24-Stunden-Einheiten: `-2` weniger als 2, `+2` mehr als 2, `2` genau 2. Minutengenau: `-mmin`.",
"references": ["man 1 find"]
},
{
"id": "103.3-009",
"objective": "103.3",
"type": "single",
"difficulty": 1,
"question": "Das Verzeichnis `alt` enthält noch Dateien. Welcher Befehl löscht es **samt Inhalt**?",
"options": [
{ "id": "a", "text": "`rm -r alt`", "correct": true, "explanation": "`-r` löscht rekursiv; mit `-f` ohne Rückfragen – vorsichtig verwenden." },
{ "id": "b", "text": "`rmdir alt`", "correct": false, "explanation": "`rmdir` löscht nur leere Verzeichnisse." },
{ "id": "c", "text": "`rm -d alt`", "correct": false, "explanation": "`-d` löscht nur leere Verzeichnisse." },
{ "id": "d", "text": "`unlink alt`", "correct": false, "explanation": "`unlink` entfernt genau eine Datei, keine Verzeichnisse." },
{ "id": "e", "text": "`rmdir -p alt`", "correct": false, "explanation": "Entfernt leere Verzeichnisse samt leerer Elternverzeichnisse." }
],
"explanation": "`rm -i` fragt vor jedem Löschen nach.",
"references": ["man 1 rm"]
},
{
"id": "103.3-010",
"objective": "103.3",
"type": "single",
"difficulty": 1,
"question": "Was passiert bei `gzip bericht.txt`?",
"options": [
{ "id": "a", "text": "Es entsteht `bericht.txt.gz`, die Originaldatei wird entfernt.", "correct": true, "explanation": "gzip ersetzt die Datei durch die komprimierte Fassung; `-k` behält das Original." },
{ "id": "b", "text": "Es entsteht `bericht.txt.gz`, die Originaldatei bleibt erhalten.", "correct": false, "explanation": "Nur mit `-k` (keep) oder `-c` und Umleitung." },
{ "id": "c", "text": "Es entsteht ein tar-Archiv `bericht.tar.gz`.", "correct": false, "explanation": "gzip komprimiert einzelne Dateien und erstellt keine Archive." },
{ "id": "d", "text": "Die Datei wird entpackt.", "correct": false, "explanation": "Entpacken: `gunzip` bzw. `gzip -d`." },
{ "id": "e", "text": "Die Datei wird in ein ZIP-Archiv gelegt.", "correct": false, "explanation": "ZIP erstellt `zip`." }
],
"explanation": "Gleiches Verhalten bei `bzip2` (`.bz2`) und `xz` (`.xz`). Lesen ohne Entpacken: `zcat`, `bzcat`, `xzcat`.",
"references": ["man 1 gzip"]
},
{
"id": "103.3-011",
"objective": "103.3",
"type": "single",
"difficulty": 2,
"question": "Wie erstellt man mit `cpio` ein Archiv aller `.conf`-Dateien unterhalb des aktuellen Verzeichnisses?",
"options": [
{ "id": "a", "text": "`find . -name '*.conf' | cpio -o > conf.cpio`", "correct": true, "explanation": "cpio liest die Dateiliste von stdin; `-o` (copy-out) schreibt das Archiv auf stdout." },
{ "id": "b", "text": "`cpio -o *.conf conf.cpio`", "correct": false, "explanation": "cpio nimmt Dateinamen nicht als Argumente, sondern von stdin." },
{ "id": "c", "text": "`find . -name '*.conf' | cpio -i > conf.cpio`", "correct": false, "explanation": "`-i` (copy-in) liest ein Archiv und entpackt." },
{ "id": "d", "text": "`cpio -c conf.cpio .`", "correct": false, "explanation": "Keine gültige Erstellung eines Archivs." },
{ "id": "e", "text": "`tar -cpio conf.cpio *.conf`", "correct": false, "explanation": "Vermischt Optionen von tar und cpio." }
],
"explanation": "Entpacken: `cpio -idv < conf.cpio`. cpio ist u. a. das Format der initramfs.",
"references": ["man 1 cpio"]
},
{
"id": "103.3-012",
"objective": "103.3",
"type": "multi",
"difficulty": 1,
"question": "Welche Aussagen zu `touch` treffen zu?",
"options": [
{ "id": "a", "text": "`touch neu.txt` legt eine leere Datei an, wenn sie noch nicht existiert.", "correct": true, "explanation": "Gängiger Weg, eine leere Datei zu erzeugen." },
{ "id": "b", "text": "Bei einer bestehenden Datei aktualisiert `touch` die Zeitstempel.", "correct": true, "explanation": "Zugriffs- und Änderungszeit werden auf jetzt gesetzt (`-a`/`-m` einzeln)." },
{ "id": "c", "text": "`touch` leert den Inhalt einer bestehenden Datei.", "correct": false, "explanation": "Der Inhalt bleibt unverändert; leeren z. B. mit `> datei` oder `truncate -s 0`." },
{ "id": "d", "text": "`touch` legt Verzeichnisse an.", "correct": false, "explanation": "Verzeichnisse legt `mkdir` an." },
{ "id": "e", "text": "`touch` darf nur root verwenden.", "correct": false, "explanation": "Jeder Benutzer mit Schreibrecht im Verzeichnis darf das." }
],
"explanation": "`touch -d '2026-10-01 12:00' datei` setzt einen bestimmten Zeitstempel.",
"references": ["man 1 touch"]
},
{
"id": "103.3-013",
"objective": "103.3",
"type": "single",
"difficulty": 1,
"question": "Alle `.log`-Dateien sollen nach `archiv/` verschoben werden; vor dem Überschreiben vorhandener Dateien soll nachgefragt werden. Welcher Befehl leistet das?",
"options": [
{ "id": "a", "text": "`mv -i *.log archiv/`", "correct": true, "explanation": "`-i` (interactive) fragt vor dem Überschreiben." },
{ "id": "b", "text": "`mv -f *.log archiv/`", "correct": false, "explanation": "`-f` überschreibt ohne Nachfrage." },
{ "id": "c", "text": "`mv -n *.log archiv/`", "correct": false, "explanation": "`-n` überschreibt nie und fragt auch nicht." },
{ "id": "d", "text": "`cp -i *.log archiv/`", "correct": false, "explanation": "Kopiert nur, die Originale bleiben." },
{ "id": "e", "text": "`mv -u *.log archiv/`", "correct": false, "explanation": "`-u` verschiebt nur, wenn die Quelle neuer ist – ohne Nachfrage." }
],
"explanation": "Auf demselben Dateisystem benennt `mv` nur um (schnell); über Dateisystemgrenzen wird kopiert und gelöscht.",
"references": ["man 1 mv"]
},
{
"id": "103.4-007",
"objective": "103.4",
"type": "single",
"difficulty": 1,
"question": "Wie nennt man die Konstruktion `cat << ENDE` gefolgt von mehreren Zeilen und einer abschließenden Zeile `ENDE`?",
"options": [
{ "id": "a", "text": "Here-Document", "correct": true, "explanation": "Die Zeilen bis zur Endmarke werden dem Befehl als stdin übergeben." },
{ "id": "b", "text": "Here-String", "correct": false, "explanation": "Here-String ist `<<< \"text\"` – eine einzelne Zeichenkette." },
{ "id": "c", "text": "Pipe", "correct": false, "explanation": "Eine Pipe verbindet stdout und stdin zweier Befehle." },
{ "id": "d", "text": "Prozessersetzung", "correct": false, "explanation": "Prozessersetzung ist `<(befehl)`." },
{ "id": "e", "text": "Befehlsersetzung", "correct": false, "explanation": "Befehlsersetzung ist `$(befehl)`." }
],
"explanation": "Mit `<< 'ENDE'` (Endmarke in Anführungszeichen) werden Variablen im Text nicht ersetzt; `<<-` entfernt führende Tabulatoren.",
"references": ["man 1 bash (Abschnitt Here Documents)"]
},
{
"id": "103.4-008",
"objective": "103.4",
"type": "fill",
"difficulty": 2,
"question": "Welcher Operator übergibt in der Bash eine einzelne Zeichenkette als Standardeingabe, z. B. `bc ___ \"2+3\"`? (nur der Operator)",
"answers": ["<<<"],
"explanation": "Here-String: `bc <<< \"2+3\"` gibt `5` aus. Gleichwertig: `echo \"2+3\" | bc`.",
"references": ["man 1 bash (Abschnitt Here Strings)"]
},
{
"id": "103.4-009",
"objective": "103.4",
"type": "single",
"difficulty": 1,
"question": "Was bewirkt in der Bash `befehl &> ausgabe.txt`?",
"options": [
{ "id": "a", "text": "Standardausgabe und Fehlerausgabe werden in `ausgabe.txt` geschrieben.", "correct": true, "explanation": "Kurzform für `> ausgabe.txt 2>&1`." },
{ "id": "b", "text": "Der Befehl läuft im Hintergrund und schreibt nur stdout in die Datei.", "correct": false, "explanation": "`&>` ist eine Umleitung, kein Hintergrundstart." },
{ "id": "c", "text": "Nur die Fehlerausgabe wird umgeleitet.", "correct": false, "explanation": "Das wäre `2>`." },
{ "id": "d", "text": "Die Ausgabe wird an die Datei angehängt.", "correct": false, "explanation": "`&>` überschreibt; anhängen: `&>>`." },
{ "id": "e", "text": "Die Datei wird als Eingabe gelesen.", "correct": false, "explanation": "Eingabe wäre `<`." }
],
"explanation": "`&>` ist Bash-spezifisch; in POSIX-sh schreibt man `> datei 2>&1`.",
"references": ["man 1 bash (Abschnitt REDIRECTION)"]
},
{
"id": "103.4-010",
"objective": "103.4",
"type": "single",
"difficulty": 1,
"question": "Die Ausgabe soll auf dem Bildschirm erscheinen und an `log.txt` **angehängt** werden. Welche Zeile ist richtig?",
"options": [
{ "id": "a", "text": "`befehl | tee -a log.txt`", "correct": true, "explanation": "`-a` (append) hängt an, statt zu überschreiben." },
{ "id": "b", "text": "`befehl | tee log.txt`", "correct": false, "explanation": "Überschreibt `log.txt`." },
{ "id": "c", "text": "`befehl | tee >> log.txt`", "correct": false, "explanation": "`tee` ohne Datei gibt nur auf stdout aus, und das landet per `>>` in der Datei – auf dem Bildschirm erscheint nichts." },
{ "id": "d", "text": "`befehl >> log.txt | tee`", "correct": false, "explanation": "stdout geht vollständig in die Datei; `tee` erhält nichts." },
{ "id": "e", "text": "`befehl 2>> log.txt`", "correct": false, "explanation": "Hängt nur die Fehlerausgabe an." }
],
"explanation": "Mehrere Ziele gleichzeitig: `befehl | tee a.txt b.txt`.",
"references": ["man 1 tee"]
},
{
"id": "103.4-011",
"objective": "103.4",
"type": "multi",
"difficulty": 2,
"question": "Welche Aussagen zu `xargs` treffen zu?",
"options": [
{ "id": "a", "text": "Mit `-n 1` wird der Befehl für jedes Argument einzeln aufgerufen.", "correct": true, "explanation": "`-n` begrenzt die Argumente pro Aufruf." },
{ "id": "b", "text": "Mit `-0` liest xargs durch NUL-Zeichen getrennte Namen, passend zu `find -print0`.", "correct": true, "explanation": "So funktionieren auch Namen mit Leerzeichen oder Zeilenumbrüchen." },
{ "id": "c", "text": "xargs liest die Argumente aus einer als Parameter angegebenen Datei, nie von stdin.", "correct": false, "explanation": "Standard ist stdin; eine Datei nur mit `-a`." },
{ "id": "d", "text": "xargs ruft den Befehl immer genau einmal pro Eingabezeile auf.", "correct": false, "explanation": "Standardmäßig bündelt xargs möglichst viele Argumente in einem Aufruf." },
{ "id": "e", "text": "Mit `-I {}` werden alle geschweiften Klammern aus der Eingabe gelöscht.", "correct": false, "explanation": "`-I {}` legt einen Platzhalter fest, der durch jedes Eingabeelement ersetzt wird." }
],
"explanation": "Beispiel mit Platzhalter: `ls *.txt | xargs -I {} cp {} /sicherung/`.",
"references": ["man 1 xargs"]
},
{
"id": "103.4-012",
"objective": "103.4",
"type": "single",
"difficulty": 2,
"question": "Wie leitet man Standardausgabe **und** Fehlerausgabe eines Befehls gemeinsam an `less` weiter?",
"options": [
{ "id": "a", "text": "`befehl 2>&1 | less`", "correct": true, "explanation": "stderr wird vor der Pipe auf stdout gelegt; beides fließt in die Pipe." },
{ "id": "b", "text": "`befehl | less 2>&1`", "correct": false, "explanation": "Die Umleitung gilt hier für `less`, nicht für `befehl`." },
{ "id": "c", "text": "`befehl 2> | less`", "correct": false, "explanation": "Syntaxfehler: `2>` braucht ein Ziel." },
{ "id": "d", "text": "`befehl > less 2>&1`", "correct": false, "explanation": "Schreibt in eine **Datei** namens `less`." },
{ "id": "e", "text": "`befehl & less`", "correct": false, "explanation": "Startet `befehl` im Hintergrund und danach `less` ohne Eingabe." }
],
"explanation": "Bash-Kurzform: `befehl |& less`.",
"references": ["man 1 bash (Abschnitt Pipelines)"]
},
{
"id": "103.4-013",
"objective": "103.4",
"type": "single",
"difficulty": 1,
"question": "Was liefert `cat /dev/null`?",
"options": [
{ "id": "a", "text": "Nichts – Lesen ergibt sofort Dateiende.", "correct": true, "explanation": "`/dev/null` verwirft Geschriebenes und liefert beim Lesen nichts." },
{ "id": "b", "text": "Endlos Nullbytes", "correct": false, "explanation": "Das liefert `/dev/zero`." },
{ "id": "c", "text": "Zufallsdaten", "correct": false, "explanation": "Das liefern `/dev/random` und `/dev/urandom`." },
{ "id": "d", "text": "Den Inhalt der zuletzt verworfenen Ausgaben", "correct": false, "explanation": "Verworfenes wird nicht gespeichert." },
{ "id": "e", "text": "Eine Fehlermeldung „Permission denied“", "correct": false, "explanation": "`/dev/null` ist für alle les- und schreibbar." }
],
"explanation": "Praktisch: `cat /dev/null > datei` leert eine Datei, ohne sie zu löschen.",
"references": ["man 4 null"]
},
{
"id": "103.5-007",
"objective": "103.5",
"type": "single",
"difficulty": 1,
"question": "Welcher Befehl zeigt **alle** Prozesse aller Benutzer mit Benutzer, CPU- und Speicheranteil an?",
"options": [
{ "id": "a", "text": "`ps aux`", "correct": true, "explanation": "BSD-Syntax: `a` alle mit Terminal, `u` benutzerorientiert, `x` auch ohne Terminal." },
{ "id": "b", "text": "`ps`", "correct": false, "explanation": "Ohne Optionen nur die Prozesse des aktuellen Terminals." },
{ "id": "c", "text": "`jobs`", "correct": false, "explanation": "Zeigt nur Jobs der aktuellen Shell." },
{ "id": "d", "text": "`pstree`", "correct": false, "explanation": "Zeigt die Prozesshierarchie ohne CPU- und Speicherwerte." },
{ "id": "e", "text": "`free`", "correct": false, "explanation": "Zeigt nur die Speicherbelegung insgesamt." }
],
"explanation": "Gleichwertig in System-V-Syntax: `ps -ef` (ohne %CPU/%MEM). Fortlaufend: `top` bzw. `htop`.",
"references": ["man 1 ps"]
},
{
"id": "103.5-008",
"objective": "103.5",
"type": "fill",
"difficulty": 1,
"question": "Welcher Befehl (nur der Name) stellt laufende Prozesse als Baum ihrer Eltern-Kind-Beziehungen dar?",
"answers": ["pstree"],
"explanation": "`pstree -p` zeigt zusätzlich die PIDs. Auch `ps -ef --forest` zeigt eine Baumansicht.",
"references": ["man 1 pstree"]
},
{
"id": "103.5-009",
"objective": "103.5",
"type": "single",
"difficulty": 1,
"question": "Welches Signal veranlasst viele Daemons, ihre **Konfiguration neu einzulesen**, ohne sich zu beenden?",
"options": [
{ "id": "a", "text": "SIGHUP (1)", "correct": true, "explanation": "Ursprünglich „Terminal aufgelegt“; Daemons ohne Terminal nutzen es als Reload-Signal." },
{ "id": "b", "text": "SIGKILL (9)", "correct": false, "explanation": "Beendet den Prozess sofort." },
{ "id": "c", "text": "SIGSTOP (19)", "correct": false, "explanation": "Hält den Prozess an." },
{ "id": "d", "text": "SIGCONT (18)", "correct": false, "explanation": "Setzt einen angehaltenen Prozess fort." },
{ "id": "e", "text": "SIGINT (2)", "correct": false, "explanation": "Unterbrechung, wie Strg+C – Programme beenden sich meist." }
],
"explanation": "Beispiel: `kill -HUP $(pidof rsyslogd)`. Bei systemd entsprechend `systemctl reload`.",
"references": ["man 7 signal"]
},
{
"id": "103.5-010",
"objective": "103.5",
"type": "single",
"difficulty": 1,
"question": "Welcher Befehl sendet SIGTERM an **alle** Prozesse mit dem Namen `httpd`?",
"options": [
{ "id": "a", "text": "`killall httpd`", "correct": true, "explanation": "`killall` wählt Prozesse nach Namen; ebenso `pkill httpd`." },
{ "id": "b", "text": "`kill httpd`", "correct": false, "explanation": "`kill` erwartet PIDs oder Jobspezifikationen." },
{ "id": "c", "text": "`pidof -k httpd`", "correct": false, "explanation": "`pidof` gibt nur PIDs aus." },
{ "id": "d", "text": "`pgrep -k httpd`", "correct": false, "explanation": "`pgrep` sucht nur; senden würde `pkill`." },
{ "id": "e", "text": "`top -k httpd`", "correct": false, "explanation": "`top` hat keine solche Option; im Programm beendet man mit der Taste `k`." }
],
"explanation": "Anderes Signal: `killall -HUP httpd` bzw. `pkill -HUP httpd`.",
"references": ["man 1 killall", "man 1 pkill"]
},
{
"id": "103.5-011",
"objective": "103.5",
"type": "multi",
"difficulty": 2,
"question": "Welche Aussagen zur Bedienung von `top` treffen zu?",
"options": [
{ "id": "a", "text": "Mit der Taste `k` sendet man einem Prozess ein Signal.", "correct": true, "explanation": "top fragt nach PID und Signal (Standard SIGTERM)." },
{ "id": "b", "text": "Mit der Taste `q` beendet man top.", "correct": true, "explanation": "quit." },
{ "id": "c", "text": "Mit der Taste `r` startet man das System neu.", "correct": false, "explanation": "`r` ändert den Nice-Wert eines Prozesses (renice)." },
{ "id": "d", "text": "Mit `M` sortiert top nach PID.", "correct": false, "explanation": "`M` sortiert nach Speicherverbrauch, `P` nach CPU." },
{ "id": "e", "text": "Mit `h` wird top im Hintergrund versteckt.", "correct": false, "explanation": "`h` zeigt die Hilfe." }
],
"explanation": "Nicht interaktiv, z. B. für Skripte: `top -b -n 1`.",
"references": ["man 1 top"]
},
{
"id": "103.5-012",
"objective": "103.5",
"type": "single",
"difficulty": 2,
"question": "Wie trennt man sich in **GNU screen** von der laufenden Sitzung, ohne sie zu beenden?",
"options": [
{ "id": "a", "text": "Strg+A, dann D", "correct": true, "explanation": "detach; wieder verbinden mit `screen -r`." },
{ "id": "b", "text": "Strg+B, dann D", "correct": false, "explanation": "Das ist die Standard-Tastenfolge von **tmux** (wieder verbinden: `tmux attach`)." },
{ "id": "c", "text": "Strg+D", "correct": false, "explanation": "Beendet die Shell im Fenster." },
{ "id": "d", "text": "Strg+Z", "correct": false, "explanation": "Hält den Vordergrundprozess an." },
{ "id": "e", "text": "Strg+C", "correct": false, "explanation": "Unterbricht den laufenden Befehl." }
],
"explanation": "Laufende Sitzungen auflisten: `screen -ls` bzw. `tmux ls`.",
"references": ["man 1 screen", "man 1 tmux"]
},
{
"id": "103.5-013",
"objective": "103.5",
"type": "single",
"difficulty": 1,
"question": "Was bewirkt `watch -n 5 df -h`?",
"options": [
{ "id": "a", "text": "`df -h` wird alle 5 Sekunden ausgeführt und die Ausgabe im Vollbild aktualisiert.", "correct": true, "explanation": "`-n` legt das Intervall fest (Standard 2 Sekunden); `-d` hebt Änderungen hervor." },
{ "id": "b", "text": "`df -h` läuft fünfmal und beendet sich dann.", "correct": false, "explanation": "`watch` läuft, bis man es mit Strg+C beendet." },
{ "id": "c", "text": "`df -h` startet in 5 Sekunden einmalig.", "correct": false, "explanation": "Einmalig verzögert wäre `sleep 5; df -h`." },
{ "id": "d", "text": "Es überwacht 5 Dateisysteme und alarmiert bei Fehlern.", "correct": false, "explanation": "`watch` alarmiert nicht von selbst." },
{ "id": "e", "text": "Es setzt den Nice-Wert von df auf 5.", "correct": false, "explanation": "Das wäre `nice -n 5 df -h`." }
],
"explanation": "Im Objective 103.5 genannt: `watch`, `screen`, `tmux`, `nohup`, `ps`, `top`, `free`, `uptime`, `pgrep`, `pkill`, `killall`.",
"references": ["man 1 watch"]
},
{
"id": "103.6-004",
"objective": "103.6",
"type": "fill",
"difficulty": 1,
"question": "Geben Sie den Befehl ein, der `./backup.sh` mit dem Nice-Wert 15 startet.",
"answers": ["nice -n 15 ./backup.sh", "nice -15 ./backup.sh", "nice --adjustment=15 ./backup.sh", "nice -n 15 backup.sh", "nice -15 backup.sh"],
"explanation": "Achtung: Bei `nice -15` ist der Bindestrich die Option, nicht das Vorzeichen; negativ wäre `nice --15` bzw. `nice -n -15`.",
"references": ["man 1 nice"]
},
{
"id": "103.6-005",
"objective": "103.6",
"type": "single",
"difficulty": 1,
"question": "In welcher Spalte zeigt `top` den Nice-Wert eines Prozesses?",
"options": [
{ "id": "a", "text": "NI", "correct": true, "explanation": "NI = nice value (−20 bis 19)." },
{ "id": "b", "text": "PR", "correct": false, "explanation": "PR ist die vom Kernel verwendete Priorität (meist 20 + NI)." },
{ "id": "c", "text": "S", "correct": false, "explanation": "S ist der Prozesszustand (R, S, D, Z, T)." },
{ "id": "d", "text": "RES", "correct": false, "explanation": "Belegter physischer Speicher." },
{ "id": "e", "text": "VIRT", "correct": false, "explanation": "Virtueller Speicher." }
],
"explanation": "In `ps -l` heißen die Spalten ebenfalls `PRI` und `NI`.",
"references": ["man 1 top"]
},
{
"id": "103.6-006",
"objective": "103.6",
"type": "single",
"difficulty": 1,
"question": "Welchen Nice-Wert erhält ein Programm, das mit `nice ./job.sh` (ohne weitere Optionen) gestartet wird?",
"options": [
{ "id": "a", "text": "10", "correct": true, "explanation": "Ohne Angabe erhöht `nice` den Wert um 10 (ausgehend von 0)." },
{ "id": "b", "text": "0", "correct": false, "explanation": "0 ist der Standard ohne `nice`." },
{ "id": "c", "text": "19", "correct": false, "explanation": "19 ist der niedrigste mögliche Vorrang, aber nicht der Standard von `nice`." },
{ "id": "d", "text": "−10", "correct": false, "explanation": "Negative Werte nur mit Root-Rechten und ausdrücklicher Angabe." },
{ "id": "e", "text": "1", "correct": false, "explanation": "Die Standarderhöhung ist 10." }
],
"explanation": "`nice` ohne Befehl gibt den aktuellen Nice-Wert der Shell aus.",
"references": ["man 1 nice"]
},
{
"id": "103.6-007",
"objective": "103.6",
"type": "single",
"difficulty": 2,
"question": "Wie setzt root den Nice-Wert **aller** laufenden Prozesse der Benutzerin `anna` auf 5?",
"options": [
{ "id": "a", "text": "`renice -n 5 -u anna`", "correct": true, "explanation": "`-u` wählt alle Prozesse eines Benutzers." },
{ "id": "b", "text": "`nice -n 5 -u anna`", "correct": false, "explanation": "`nice` startet neue Befehle und kennt kein `-u`." },
{ "id": "c", "text": "`renice -n 5 -p anna`", "correct": false, "explanation": "`-p` erwartet PIDs." },
{ "id": "d", "text": "`usermod -n 5 anna`", "correct": false, "explanation": "`usermod` hat keine Nice-Option." },
{ "id": "e", "text": "`ulimit -e 5 anna`", "correct": false, "explanation": "`ulimit -e` setzt eine Obergrenze der Priorität für die eigene Shell, nicht für fremde Prozesse." }
],
"explanation": "Mit `-g` wählt `renice` eine Prozessgruppe.",
"references": ["man 1 renice"]
},
{
"id": "103.7-005",
"objective": "103.7",
"type": "single",
"difficulty": 1,
"question": "Welche grep-Option ignoriert die Groß- und Kleinschreibung?",
"options": [
{ "id": "a", "text": "`-i`", "correct": true, "explanation": "`--ignore-case`." },
{ "id": "b", "text": "`-w`", "correct": false, "explanation": "Trifft nur ganze Wörter." },
{ "id": "c", "text": "`-x`", "correct": false, "explanation": "Trifft nur ganze Zeilen." },
{ "id": "d", "text": "`-c`", "correct": false, "explanation": "Zählt passende Zeilen." },
{ "id": "e", "text": "`-h`", "correct": false, "explanation": "Unterdrückt Dateinamen in der Ausgabe." }
],
"explanation": "Kombinierbar, z. B. `grep -iw error /var/log/syslog`.",
"references": ["man 1 grep"]
},
{
"id": "103.7-006",
"objective": "103.7",
"type": "fill",
"difficulty": 1,
"question": "Welche grep-Option (nur die Option) durchsucht Verzeichnisse **rekursiv**?",
"answers": ["-r", "-R", "--recursive", "--dereference-recursive"],
"explanation": "`-r` folgt symbolischen Links nur auf der Befehlszeile, `-R` allen. Beispiel: `grep -rn PermitRootLogin /etc/ssh/`.",
"references": ["man 1 grep"]
},
{
"id": "103.7-007",
"objective": "103.7",
"type": "single",
"difficulty": 2,
"question": "Welcher erweiterte reguläre Ausdruck (`grep -E`) passt sowohl auf `color` als auch auf `colour`?",
"options": [
{ "id": "a", "text": "`colou?r`", "correct": true, "explanation": "`?` bedeutet: vorheriges Zeichen null- oder einmal." },
{ "id": "b", "text": "`colo.r`", "correct": false, "explanation": "`.` verlangt genau ein Zeichen zwischen `colo` und `r` – passt auf `colour`, nicht auf `color`." },
{ "id": "c", "text": "`colo[u]r`", "correct": false, "explanation": "Die Klammer verlangt genau ein `u`." },
{ "id": "d", "text": "`colo(u)+r`", "correct": false, "explanation": "`+` verlangt mindestens ein `u`." },
{ "id": "e", "text": "`^colour$`", "correct": false, "explanation": "Passt nur auf Zeilen, die genau `colour` lauten." }
],
"explanation": "In Basic RE schreibt man unter GNU grep `colou\\?r`.",
"references": ["man 7 regex"]
},
{
"id": "103.7-008",
"objective": "103.7",
"type": "single",
"difficulty": 1,
"question": "Welche sed-Option ändert die Datei **direkt** (in place), statt das Ergebnis auf stdout auszugeben?",
"options": [
{ "id": "a", "text": "`-i`", "correct": true, "explanation": "`-i.bak` legt zusätzlich eine Sicherung an." },
{ "id": "b", "text": "`-n`", "correct": false, "explanation": "Unterdrückt die automatische Ausgabe (zusammen mit `p`)." },
{ "id": "c", "text": "`-e`", "correct": false, "explanation": "Leitet ein sed-Skript ein (mehrere `-e` möglich)." },
{ "id": "d", "text": "`-E`", "correct": false, "explanation": "Aktiviert erweiterte reguläre Ausdrücke." },
{ "id": "e", "text": "`-s`", "correct": false, "explanation": "Behandelt mehrere Dateien getrennt." }
],
"explanation": "Vor `sed -i` an wichtigen Dateien das Ergebnis ohne `-i` prüfen.",
"references": ["man 1 sed"]
},
{
"id": "103.7-009",
"objective": "103.7",
"type": "single",
"difficulty": 1,
"question": "Was gibt `sed '/^#/d' app.conf` aus?",
"options": [
{ "id": "a", "text": "Den Inhalt von `app.conf` ohne die Zeilen, die mit `#` beginnen", "correct": true, "explanation": "`/muster/d` löscht passende Zeilen aus der Ausgabe; die Datei bleibt unverändert." },
{ "id": "b", "text": "Nur die Zeilen, die mit `#` beginnen", "correct": false, "explanation": "Das wäre `sed -n '/^#/p'`." },
{ "id": "c", "text": "Nichts – die Datei wird gelöscht", "correct": false, "explanation": "`d` löscht Zeilen aus dem Datenstrom, keine Dateien." },
{ "id": "d", "text": "Den Inhalt, wobei jedes `#` durch `d` ersetzt wird", "correct": false, "explanation": "Ersetzen wäre `s/#/d/`." },
{ "id": "e", "text": "Nur die erste Zeile", "correct": false, "explanation": "Das wäre `sed -n 1p` bzw. `sed q`." }
],
"explanation": "Mit Leerzeilen zusammen: `sed -e '/^#/d' -e '/^$/d' app.conf`.",
"references": ["man 1 sed"]
},
{
"id": "103.7-010",
"objective": "103.7",
"type": "multi",
"difficulty": 2,
"question": "Welche Aussagen zu grep und seinen Varianten treffen zu?",
"options": [
{ "id": "a", "text": "`grep -c muster datei` gibt die Anzahl passender Zeilen aus.", "correct": true, "explanation": "Pro Datei eine Zahl." },
{ "id": "b", "text": "`grep -l muster *.conf` gibt nur die Namen der Dateien mit Treffern aus.", "correct": true, "explanation": "`-L` gibt umgekehrt die Dateien ohne Treffer aus." },
{ "id": "c", "text": "`egrep` entspricht `grep -F`.", "correct": false, "explanation": "`egrep` entspricht `grep -E`; `fgrep` entspricht `grep -F`." },
{ "id": "d", "text": "`fgrep` wertet reguläre Ausdrücke aus.", "correct": false, "explanation": "`fgrep` sucht feste Zeichenketten ohne Sonderbedeutung." },
{ "id": "e", "text": "`grep -o` gibt immer die ganze passende Zeile aus.", "correct": false, "explanation": "`-o` gibt nur den passenden Teil aus." }
],
"explanation": "`egrep` und `fgrep` gelten als veraltet; besser `grep -E` und `grep -F`.",
"references": ["man 1 grep"]
},
{
"id": "103.8-005",
"objective": "103.8",
"type": "single",
"difficulty": 1,
"question": "Welche Taste macht in vi im Befehlsmodus die letzte Änderung **rückgängig**?",
"options": [
{ "id": "a", "text": "`u`", "correct": true, "explanation": "undo; in vim wiederholt Strg+R das Rückgängiggemachte." },
{ "id": "b", "text": "`x`", "correct": false, "explanation": "Löscht das Zeichen unter dem Cursor." },
{ "id": "c", "text": "`p`", "correct": false, "explanation": "Fügt den Pufferinhalt ein." },
{ "id": "d", "text": "`r`", "correct": false, "explanation": "Ersetzt ein einzelnes Zeichen." },
{ "id": "e", "text": "`.`", "correct": false, "explanation": "Wiederholt die letzte Änderung." }
],
"explanation": "`U` macht alle Änderungen in der aktuellen Zeile rückgängig.",
"references": [":help undo"]
},
{
"id": "103.8-006",
"objective": "103.8",
"type": "fill",
"difficulty": 1,
"question": "Welche Tastenfolge kopiert in vi im Befehlsmodus die **aktuelle Zeile** in den Puffer (yank)?",
"answers": ["yy", "Y"],
"explanation": "Mit `p` fügt man sie unterhalb, mit `P` oberhalb ein. `3yy` kopiert drei Zeilen.",
"references": [":help yy"]
},
{
"id": "103.8-007",
"objective": "103.8",
"type": "single",
"difficulty": 2,
"question": "Welcher Ex-Befehl ersetzt in vi **in der ganzen Datei** jedes Vorkommen von `alt` durch `neu`?",
"options": [
{ "id": "a", "text": "`:%s/alt/neu/g`", "correct": true, "explanation": "`%` = alle Zeilen, `g` = alle Vorkommen je Zeile." },
{ "id": "b", "text": "`:s/alt/neu/`", "correct": false, "explanation": "Nur das erste Vorkommen in der aktuellen Zeile." },
{ "id": "c", "text": "`:%s/alt/neu/`", "correct": false, "explanation": "Ohne `g` nur das erste Vorkommen je Zeile." },
{ "id": "d", "text": "`/alt/neu`", "correct": false, "explanation": "Eine Suche nach dem Muster `alt/neu`." },
{ "id": "e", "text": "`:g/alt/`", "correct": false, "explanation": "Führt einen Befehl (Standard: ausgeben) für alle passenden Zeilen aus, ersetzt nichts." }
],
"explanation": "Mit Rückfrage je Treffer: `:%s/alt/neu/gc`.",
"references": [":help :substitute"]
},
{
"id": "103.8-008",
"objective": "103.8",
"type": "single",
"difficulty": 1,
"question": "Wie springt man in vi zur Zeile 42?",
"options": [
{ "id": "a", "text": "`:42`", "correct": true, "explanation": "Ex-Befehl mit Zeilennummer; gleichwertig im Befehlsmodus `42G`." },
{ "id": "b", "text": "`42dd`", "correct": false, "explanation": "Löscht 42 Zeilen ab der aktuellen." },
{ "id": "c", "text": "`/42`", "correct": false, "explanation": "Sucht nach dem Text „42“." },
{ "id": "d", "text": "`42yy`", "correct": false, "explanation": "Kopiert 42 Zeilen." },
{ "id": "e", "text": "`G42`", "correct": false, "explanation": "`G` springt ans Dateiende; `42` wäre dann der Beginn eines neuen Befehls." }
],
"explanation": "`gg` springt an den Anfang, `G` ans Ende. Zeilennummern anzeigen: `:set number`.",
"references": [":help G"]
},
{
"id": "103.8-009",
"objective": "103.8",
"type": "multi",
"difficulty": 1,
"question": "Welche Aussagen zu Texteditoren unter Linux treffen zu?",
"options": [
{ "id": "a", "text": "Die Variablen `EDITOR` bzw. `VISUAL` bestimmen den Editor für Programme wie `crontab -e` oder `visudo`.", "correct": true, "explanation": "z. B. `export EDITOR=vim` in `~/.bashrc`." },
{ "id": "b", "text": "In vi wechselt man mit der Esc-Taste in den Befehlsmodus.", "correct": true, "explanation": "Aus dem Einfüge- oder Ersetzungsmodus." },
{ "id": "c", "text": "`:q` beendet vi auch dann, wenn ungesicherte Änderungen vorliegen.", "correct": false, "explanation": "vi verweigert das; erzwingen mit `:q!`." },
{ "id": "d", "text": "`ZZ` verwirft alle Änderungen.", "correct": false, "explanation": "`ZZ` speichert (falls geändert) und beendet." },
{ "id": "e", "text": "`vi -R datei` öffnet die Datei mit Root-Rechten.", "correct": false, "explanation": "`-R` öffnet schreibgeschützt (read-only)." }
],
"explanation": "Im Objective genannt: vi mit `/`, `?`, `h j k l`, `i o a`, `d p y dd yy`, `ZZ :w! :q!`, sowie nano und emacs als Alternativen.",
"references": [":help ZZ"]
}
]
}