• 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 not found

by Deepika

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

If you encounter the below error while running the command namei:

namei: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install util-linux
Ubuntu apt-get install util-linux
Alpine apk add util-linux
Arch Linux pacman -S util-linux
Kali Linux apt-get install util-linux
CentOS yum install util-linux
Fedora dnf install util-linux
OS X brew install util-linux
Raspbian apt-get install util-linux

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. kpartx Command Examples in Linux
  2. How to extend ASM disk from OS level in CentOS/RHEL
  3. CentOS / RHEL : How to get the date and time of executed command in the history command output
  4. mons: command not found
  5. CentOS / RHEL 7 : How to configure Network Bonding or NIC teaming
  6. How to disable firewalld and and switch to iptables in CentOS / RHEL 7
  7. bpftrace Command Examples in Linux
  8. pactl: command not found
  9. Monitor HDD and SSD with smartd and smartctl
  10. CentOS / RHEL 7 : How to configure VLAN Tagging using nmcli

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright