GNU/Linux >> LINUX-Kenntnisse >  >> Linux

Eine einfache Erklärung des NAMEI-Befehls in Linux

Zum Beispiel:

$ namei test/test1.txt

Ausgabe:

f:der Pfadname

d:Verzeichnis

-:der Dateiname

Kurzbeschreibung

BESCHREIBUNG nach oben

       <strong>namei </strong>interprets its arguments as pathnames to any type of Unix
       file (symlinks, files, directories, and so forth). <strong>namei </strong>then
       follows each pathname until an endpoint is found (a file, a
       directory, a device node, etc). If it finds a symbolic link, it
       shows the link, and starts following it, indenting the output to
       show the context.

       This program is useful for finding "too many levels of symbolic
       links" problems.

       For each line of output, <strong>namei </strong>uses the following characters to
       identify the file type found:

              f: = the pathname currently being resolved
               d = directory
               l = symbolic link (both the link and its contents are output)
               s = socket
               b = block device
               c = character device
               p = FIFO (named pipe)
               - = regular file
               ? = an error of some kind

       <strong>namei </strong>prints an informative message when the maximum number of
       symbolic links this system can have has been exceeded.
Code language: HTML, XML (xml)

Mit dem namei-Befehl

1. Am linken Rand ausrichten (mit der Option -v)

$ namei -v test/test1.txt

Ausgabe:

2. Eigentümer und Gruppe anzeigen (mit Option -o)

$ namei -o test/test1.txt

Ausgabe:

Dies beweist, dass sowohl dieser Ordner als auch die Datei Ubuntu gehören.

3. Lange Liste anzeigen (mit Option -l)

$ namei -l test/test1.txt

Ausgabe:

Mit dieser Option werden mehr Rechte des Eigentümers angezeigt.

Wenn Sie nur die Rechte des Eigentümers anzeigen möchten, verwenden wir die Option -m:

$ namei -m test/test1.txt

Ausgabe:

Schlussfolgerung

Wir haben Ihnen gerade beigebracht, den namei-Befehl unter Linux zu verwenden.

Ein weiterer interessanter Artikel könnte sein:A Easy Way To Install FortiClient VPN


Linux
  1. So verwenden Sie den Linux-Grep-Befehl

  2. So verwenden Sie den Verlaufsbefehl unter Linux

  3. Meistern Sie den Linux-ls-Befehl

  4. Erläuterung des Befehls --update add für Alpine Linux

  5. Machen Sie den Linux-Papierkorbbefehl rückgängig

Der Timer-Befehl in Linux

Der Linux-Curl-Befehl

Wesentliche Beispiele des ps-Befehls in Linux

Was ist der Kill-Befehl in Linux?

Verstehen des Zeitbefehls in Linux

Verwendung des grep-Befehls unter Linux