Forums
New posts
Search forums
What's new
New posts
Latest activity
Members
Registered members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
DIY & Tutorials
DIY, Audio & Video Tutorials
Simplicity of Linux
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
Help Support AVForums:
This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Message
<blockquote data-quote="Now Playing" data-source="post: 107560" data-attributes="member: 2381"><p>How did a thread covering some HOWTOs for Linux turn into a Linux vs Windows debate <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p>File permissions always has me scratching my head (don't get enough practice), particularly affecting changes throughout a directory tree, so here are a few I've figured out the hard way:</p><p></p><p>To work only on directories, do the following:[code]find . -type d -execdir <insert_command_here> {} \;[/code] e.g. to set R/W permissions for the user that owns a directory (incl. child directories) and all other members of the directory's group you'd use[code]find . -type d -execdir chmod ug+rw {} \;[/code]</p><p></p><p></p><p>Similarly, to act on specified files only:[code]find . -name "<insert_filespec_here>" -type f -execdir <insert_command_here> {} \;[/code] e.g. to grant R/W file permissions to all members of a file's group for all files ending in .txt you'd use:[code]find . -name "*.txt" -type f -execdir chmod g+rw {} \;[/code]</p></blockquote><p></p>
[QUOTE="Now Playing, post: 107560, member: 2381"] How did a thread covering some HOWTOs for Linux turn into a Linux vs Windows debate :) File permissions always has me scratching my head (don't get enough practice), particularly affecting changes throughout a directory tree, so here are a few I've figured out the hard way: To work only on directories, do the following:[code]find . -type d -execdir <insert_command_here> {} \;[/code] e.g. to set R/W permissions for the user that owns a directory (incl. child directories) and all other members of the directory's group you'd use[code]find . -type d -execdir chmod ug+rw {} \;[/code] Similarly, to act on specified files only:[code]find . -name "<insert_filespec_here>" -type f -execdir <insert_command_here> {} \;[/code] e.g. to grant R/W file permissions to all members of a file's group for all files ending in .txt you'd use:[code]find . -name "*.txt" -type f -execdir chmod g+rw {} \;[/code] [/QUOTE]
Insert quotes…
Verification
Post reply
DIY & Tutorials
DIY, Audio & Video Tutorials
Simplicity of Linux
Top