Dave's Brain

Browse - Computer Tips - How can I follow a path and show permissions along the way?

Date: 2017jan29
OS: Linux

Q.  How can I follow a path and show permissions along the way?

A.  Use the namei command.  Its man page says:

follow a pathname until a terminal point is found
Example:
namei -l /var/mail/myuser
f: /var/mail/myuser dr-xr-xr-x root root / drwxr-xr-x root root var lrwxrwxrwx root root mail -> spool/mail drwxr-xr-x root root spool drwxrwxr-x root mail mail -rw-rw---- myuser mail myuser

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.