namei Command in Linux System - Explained with Examples

This article covers how to use the namei command in Linux.

The namei command in Linux follows a pathname until a terminal point is found. Following is its syntax:

$ namei [options] pathname...

And here's what the man page says about this tool:

  • 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.