There's a command, I think it comes with apache, or is somehow related to it, that checks permissions, all the way down. So if I have /home/foo/bar/baz it will tell me what the permissions are for baz, bar, foo, and home. Does anyone know what this command is or another way of doing this? The command basically starts at the argument, and works it's way up to / letting you know what the permissions are along the way so you can see if you have a permission problem.
|
|
||||
|
|
|
I'm not aware of any commands, but it is quite easy to write a script:
Example:
|
||||
|
|
|
The utility you may be thinking of is the
The output you desire can be received as follows:
The |
|||||||||||
|
|
How about a recursive bash function for a fun solution:
|
||||
|
|
|
This could easily be made a one-liner. This is not recursive and should be a relatively fast way of doing this in bash. Calling pwd in each loop isn't particularly fast, so avoid if you can.
Alternative, a one-liner for the current directory.
|
|||||||||||
|

