Tag 189/2016: namei – follow a pathname until a terminal point is found


namei interprets its arguments as pathnames to any type of Unix file (symlinks, files, directories, and so forth). namei 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.


# namei -l $(pwd)
f: /usr/local/bin
drwxr-xr-x root root /
drwxr-xr-x root root usr
drwxr-xr-x root root local
drwxr-xr-x root root bin

This short post exists merely for me because everytime this command would be handy I have to waste 10 Google-Minutes to find it („No! Not the ls command“, „No! Not find with arguments“, „No! …“).

For example: Now that you know what it does (see example output) try to search for it not using phrases from the description above. If you have a nice phrase please leave it in the comments…

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.