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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. CentOS / RHEL 7 : How to modify the kernel command line
  2. as Command Examples in Linux
  3. CentOS / RHEL 7 : Enable NTP to start at boot after fresh install (disable chrony)
  4. Basic Master Cups Server and Clients Configuration for Browsing in CentOS/RHEL 7
  5. CentOS / RHEL : How to get the date and time of executed command in the history command output
  6. How to Check whether SELinux is Enabled or Disabled
  7. kwriteconfig5: command not found
  8. at Command Examples in Linux
  9. How to remove the multipath device after unmapping the storage LUN from server
  10. CentOS / RHEL 6 : How to change SNMP log level

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright