Friday, October 22, 2010

namei

Very catchy name ain't it ? :P Hold on, don't raise high expectation out if this post, its just a handy Linux command. Go on reading further....

Linux man page says: 'namei' - follow a path name until a terminal point is found.

This is a very useful commands I came across recently - which can definitly be of a great help if you have a very complex environment with "too many levels of symbolic links".
It has two switch:

namei -x : show mount points wit 'D' and dir with 'd'
namei -m : shopws mode bit

For ex:

[root@DebuTestBox ~]# namei -x python
f: python/

l python -> /usr/local/Python-2.5
d /
D usr
d local
d Python-2.5

[root@DebuTestBox ~]# namei -m python
f: python/
lrwxrwxrwx python -> /usr/local/Python-2.5
drwxr-xr-x /
drwxr-xr-x usr
drwxr-xr-x local
drwxr-xr-x Python-2.5


Thanks/-
DEBA

No comments:

Post a Comment

'Optimism Bias' leads to poor decision making!

Effective Time-management and Time-boxing is a concern for 'always ready people'.  Being from a background that I am from,  I am...