Is there a command like namei for OS X? I'm sifting through some incorrect permission issues and discovered the namei command for Linux. Homebrew doesn't currently have a Mac port.


  namei - follow a pathname until a terminal point is found


Is there a command or series of commands that can be used to accomplish the same thing on OS X?
Macports has a port of it: https://trac.macports.org/browser/trunk/dports/devel/util-linux/Portfile

I did try to make a homebrew recipe for it, but there were some issues getting it to compile. It's definitely possible, but there are some problems to work out.

Update:

I've made a formula that can be installed with:

brew install mkdryden/homebrew-misc/namei


This is the original version, not the version pulled into util-linux. (not sure how much has changed since the original)