June 21, 2007
Symbolic Help
Today's obscure Unix command is namei, or the ol' "follow a pathname until a terminal point is found" command. You pass it a pathname and it will print out each "piece" of that path name, tell you what it is, and move down. This is particularly handy for figuring out what, if any, parts of a path are some kind of symbolic link. For instance, I have a partition mounted on /data, where I've created a folder for my user to use:
$ ls -l /data total 20K drwxr-xr-x 8 jdarnold users 4.0K Jun 21 14:58 jdarnold drwx------ 2 root root 16K May 4 15:54 lost+found $ ls -ld data lrwxrwxrwx 1 jdarnold users 14 May 7 10:21 data -> /data/jdarnold $ namei /home/jdarnold/data/message.backup f: /home/jdarnold/data/message.backup d / d home d jdarnold l data -> /data/jdarnold d / d data d jdarnold - message.backup
Not the most critical tool in your belt, but it still might come in handy, especially, as the man page says, in those times of "too many levels of symbolic links" errors.
del.icio.us | Digg it | Furl | Yahoo MyWeb | Create Social Bookmark Links
Posted by jdarnold at 06:16 PM | TrackBack
Track with co.mments
Track with co.mments 


