commands

namei — inspect pathname components

Util-linux tool walks path components, follows symlinks by default, and -l displays long details including modes and owners. May reveal inaccessible components; inspect actual diagnostic and status. Read-only. Example assumes a fresh permissions lab fixture.

Formal Syntax & Structure

linux syntaxlinux
namei [OPTION] PATH...

Parameters & Attributes

NameTypeDescription
PATHoperandpathname to inspect
-loptionlong listing

Return Value

exit status and output

Util-linux tool walks path components, follows symlinks by default, and -l displays long details including modes and owners. May reveal inaccessible components; inspect actual diagnostic and status. Read-only.

Working Example

Example Snippetlinux
namei -l room/note.txt | awk 'NR > 1 {print $1, $NF}'
Linux Reference