• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

namei Command Examples in Linux

by admin

“namei” is a Unix command-line utility that is used to display the pathnames of files or directories and the associated metadata (permissions, owner, etc.). It also resolves symbolic links, meaning that it follows the chain of symbolic links until it reaches the final file or directory in the path. This is particularly useful for debugging “too many levels of symbolic links” errors, where a symbolic link refers to another symbolic link in a recursive manner, resulting in an infinite loop. By using “namei”, you can trace the path of symbolic links to the final target and identify where the loop is occurring. In this way, “namei” helps you to diagnose and resolve these types of issues.

namei Command Examples

1. Resolve the pathnames specified as the argument parameters:

# namei path/to/a path/to/b path/to/c

2. Display the results in a long-listing format:

# namei --long path/to/a path/to/b path/to/c

3. Show the mode bits of each file type in the style of `ls`:

# namei --modes path/to/a path/to/b path/to/c

4. Show owner and group name of each file:

# namei --owners path/to/a path/to/b path/to/c

5. Don’t follow symlinks while resolving:

# namei --nosymlinks path/to/a path/to/b path/to/c

Filed Under: Linux

Some more articles you might also be interested in …

  1. atool Command Examples in Linux
  2. sar: command not found
  3. How to uninstall nodejs software package in Ubuntu
  4. edquota Command Examples in Linux
  5. Linux OS Service ‘sendmail’
  6. jekyll Command Examples
  7. ffuf Command Examples in Linux
  8. pacman –upgrade Command Examples in Linux
  9. airodump-ng – Capture packets and display information about wireless networks (Command Examples)
  10. qm destroy Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright