I remember doing someting like "XXX /home/user/dir/child/file" and it returned the owner and/or permission of:
/home /home/user /home/user/dir /home/user/child /home/user/child/file
But I don't remember what this command was. Anybody any idea?
I think you might be thinking of the
The above switches do the following:
After giving it some thougth I came up with this
The output looks like this
I hope it is ok that it is in reverse order.
Based on the comments, here's a way to list from the root downwards:
|show 3 more comments|
The command you are looking for listing permissions and owners/groups is ls -l.
-l option is used for long listing format.
In addition, if you want to list and the hidden files then add the -a(all) option.
Also, if you want to list permissions in your subdirectories use -R (recursive) option.
The first column displays the permissions(read(r), write(w), execute(x)) and some special permissions(directories(d), -(regular file)) and the 3rd and 4th column shows you the file/directory owner and group respectively.