Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Shell script question
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Niwrad" data-source="post: 126759"><p>Is there a shell script or command that will list out the permissions for every directory from a file's path? </p><p></p><p>e.g: If we wanted to run the script on ~/dir1/dir2/dir3/file, the desirable output would be something like:</p><p></p><p>drwxrwxr-t 333 root admin 333 Jun 3 13:33 Users</p><p>drwxr-xr-x 33 $shortname $shortname 333 Jun 3 13:33 $shortname</p><p>drwxr-xr-x 3 $shortname $shortname 333 May 3 13:33 dir1</p><p>drwxr-xr-x 3 $shortname $shortname 333 May 3 13:33 dir2</p><p>drwxr-xr-x 3 $shortname $shortname 333 May 3 13:33 dir3</p><p>-rwxr-xr-x 3 $shortname $shortname 333 May 3 13:33 file</p></blockquote><p></p>
[QUOTE="Niwrad, post: 126759"] Is there a shell script or command that will list out the permissions for every directory from a file's path? e.g: If we wanted to run the script on ~/dir1/dir2/dir3/file, the desirable output would be something like: drwxrwxr-t 333 root admin 333 Jun 3 13:33 Users drwxr-xr-x 33 $shortname $shortname 333 Jun 3 13:33 $shortname drwxr-xr-x 3 $shortname $shortname 333 May 3 13:33 dir1 drwxr-xr-x 3 $shortname $shortname 333 May 3 13:33 dir2 drwxr-xr-x 3 $shortname $shortname 333 May 3 13:33 dir3 -rwxr-xr-x 3 $shortname $shortname 333 May 3 13:33 file [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Shell script question
Top