• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Hilfe !

Status
Für weitere Antworten geschlossen.
Hallo,
ich bin mir nicht sicher, ob die Frage hier hingehört, aber vielleicht kann mir ja trotzdem jemand von euch helfen. Bin nämlich absoluter Neuling auf dem Gebiet Linux.

Hier meine Frage:

10. Welche(r) der nachfolgend aufgelisteten Befehle schreibt die gesamte Struktur des Unterverzeichnisses „kdk/jahr_3“ unabhängig vom aktuellen Verzeichnis seitenweise auf den Schirm ?


a) ls -r --color ~/linustest/kdk/jahr_3 | more

b) ls -R --color kdk/jahr_3 | more

c) ls -R ~/linustest/kdk/jahr_3 | more

d) ls -RF --color ~/linustest/kdk/jahr_3 | more

e) ls -RF --color /linustest/kdk/jahr_3 | more

f) ls -rF --color ~/linustest/kdk/jahr_3 | more


Vielen Dank im voraus
 
Variante c sieht für den Zweck gut aus.
b scheidet aus weil nicht unabhängig vom aktuellen Verzeichnis.
Und -R sollte es schon sein wegen Rekursiv.
-r und -F tun bei deiner Anwendung nichts zur Sache.

11:54 linux:~ # ls --help
Aufruf: /bin/ls [OPTION]... [DATEI]...
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuSUXY nor --sort.

Erforderliche Argumente für lange Optionen sind auch für kurze erforderlich.
-a, --all do not ignore entries starting with .
-A, --almost-all do not list implied . and ..
--author with -l, print the author of each file
-b, --escape print octal escapes for nongraphic characters
--block-size=GRÖßE GRÖßE große Blöcke verwenden
-B, --ignore-backups Einträge, die mit ~ enden, nicht ausgeben
-c mit -lt: Sortieren nach und Anzeige von ctime
(Zeit der letzten Veränderung der Datei-Status-
informationen); mit -l: ctime anzeigen und nach
Namen sortieren
-C list entries by columns
--color[=WHEN] control whether color is used to distinguish file
types. WHEN may be `never', `always', or `auto'
--cperm highlight permissions
-d, --directory list directory entries instead of contents,
and do not dereference symbolic links
-D, --dired generate output designed for Emacs' dired mode
-f do not sort, enable -aU, disable -lst
-F, --classify append indicator (one of */=>@|) to entries
--file-type likewise, except do not append `*'
--format=WORD across -x, commas -m, horizontal -x, long -l,
single-column -1, verbose -l, vertical -C
--full-time like -l --time-style=full-iso
-g like -l, but do not list owner
-G, --no-group like -l, but do not list group
-h, --human-readable with -l, print sizes in human readable format
(e.g., 1K 234M 2G)
--si likewise, but use powers of 1000 not 1024
-H, --dereference-command-line
follow symbolic links listed on the command line
--dereference-command-line-symlink-to-dir
follow each command line symbolic link
that points to a directory
--hide=PATTERN do not list implied entries matching shell PATTERN
(overridden by -a or -A)
--indicator-style=WORD append indicator with style WORD to entry names:
none (default), slash (-p),
file-type (--file-type), classify (-F)
-i, --inode with -l, print the index number of each file
-I, --ignore=PATTERN do not list implied entries matching shell PATTERN
-k like --block-size=1K
-l lange Listenformat verwenden
-L, --dereference bei symbolischen Verknüpfungen die Eigenschaften
der jeweiligen Zieldatei anzeigen
-m so viele Einträge wie möglich, durch Kommata
getrennt, in eine Zeile packen
-n, --numeric-uid-gid like -l, but list numeric user and group IDs
-N, --literal print raw entry names (don't treat e.g. control
characters specially)
-o like -l, but do not list group information
-p, --indicator-style=slash
append / indicator to directories
-q, --hide-control-chars ,,?" statt nicht-druckbarer Zeichen ausgeben
--show-control-chars nicht-druckbare Zeichen anzeigen, wie sie sind
(Standardvorgabe, außer wenn das Programm ,,ls"
ist und die Ausgabe auf ein Terminal geht)
-Q, --quote-name Eintrags-Namen in doppelte Anführungszeichen.
--quoting-style=WORT Anführungszeichen-Stil WORT benutzen:
literal, locale, shell, shell-always, c, escape
-r, --reverse reverse order while sorting
-R, --recursive list subdirectories recursively
-s, --size with -l, print size of each file, in blocks
-S sort by file size
--sort=WORD extension -X, none -U, size -S, time -t,
version -v, status -c, time -t, atime -u,
access -u, use -u
--time=WORD with -l, show time as WORD instead of modification
time: atime, access, use, ctime or status; use
specified time as sort key if --sort=time
--time-style=STYLE with -l, show times using style STYLE:
full-iso, long-iso, iso, locale, +FORMAT.
FORMAT is interpreted like `date'; if FORMAT is
FORMAT1<newline>FORMAT2, FORMAT1 applies to
non-recent files and FORMAT2 to recent files;
if STYLE is prefixed with `posix-', STYLE
takes effect only outside the POSIX locale
-t sort by modification time
-T, --tabsize=COLS assume tab stops at each COLS instead of 8
-u mit -lt: Sortieren nach und Anzeige von Zugriffs-
zeit; mit -l: Anzeige von Zugriffszeit und
nach Namen sortieren; sonst: nach Zugriffszeit
-U nicht sortieren; Einträge in Reihenfolge des
Verzeichnisses auflisten
-v nach Version sortieren
-w, --width=COLS assume screen width instead of current value
-x list entries by lines instead of by columns
-X sort alphabetically by entry extension
-Y sort directories-first and by-name
-1 list one file per line
--help diese Hilfe anzeigen und beenden
--version Versionsinformation anzeigen und beenden

GRÖßE kann eine der folgenden Abkürzungen sein (oder eine Zahl, die optional
von einer der Abkürzungen gefolgt wird):
kB 1000, K 1024, MB 1000×1000, M 1024×1024 und so weiter für G, T, P, E, Z, Y.

By default, color is not used to distinguish types of files. That is
equivalent to using --color=none. Using the --color option without the
optional WHEN argument is equivalent to using --color=always. With
--color=auto, color codes are output only if standard output is connected
to a terminal (tty). The environment variable LS_COLORS can influence the
colors, and can be set easily by the dircolors command.

Exit status is 0 if OK, 1 if minor problems, 2 if serious trouble.

Melden Sie Fehler (auf Englisch, mit LC_ALL=C) an <bug-coreutils@gnu.org>.
 
A

Anonymous

Gast
Prüfungs oder Hausaufgaben werden hier nicht gelöst, aber wir können schon mal eine Tipp geben auf was man achten müsste um das richtige Ergebnis zu finden.
unabhängig vom aktuellen Verzeichnis...gesamte Struktur der Unterverzeichnisse ... seitenweise
1. Unabhängig - also welche hier aufgeführe Pfad Bezeichnung funktioniert unabhängig vom Verzeichniss wo du dich gerade befindest? Oder anderes herum, welcher Bezeichnung ist abhängig vom dem Verzeichnis in dem du dich befindest ?
(Es fällt hier schon eine Punkt durch )

2. gesammte Struktur - also alles anzeigen was sich darin befindet, und wenn es ein Unterverzeichniss ist, dann auch dort alles anzeigen und wenn sich dort auch noch ein Verzeichnis befindet dann auch noch dort alles anzeigen usw. man nennt sowas rekursiv. Das hat was mit den Optionen von ls zu tun. Insgesamt wurden verwendet -r -R -F --color in verschiedenen Kombinationen die sich aber nicht gegenseitig behindern sondern nur ergänzen. Also welche Option bedeutet hier "Rekursiv alles anzeigen" ?
(Fallen wieder 2 durch)

3. Ausgabe Seitenweise, welcher Befehl macht jetzt nun wieder das ?
(fallen jetzt wieviele durch ?)

Was jetzt noch übrig ist, müsste dann die Lösung sein, (ich sehe mehrere)

robi
 
Status
Für weitere Antworten geschlossen.
Oben