<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Recursive chmod Tricks	</title>
	<atom:link href="http://chrisgilligan.com/wordpress/chmod-recursive-files-only-directories-type/feed/" rel="self" type="application/rss+xml" />
	<link>https://chrisgilligan.com/wordpress/chmod-recursive-files-only-directories-type/</link>
	<description>portfolio of web work</description>
	<lastBuildDate>Thu, 25 Feb 2021 20:27:58 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.4</generator>
	<item>
		<title>
		By: Tylla		</title>
		<link>https://chrisgilligan.com/wordpress/chmod-recursive-files-only-directories-type/#comment-44330</link>

		<dc:creator><![CDATA[Tylla]]></dc:creator>
		<pubDate>Thu, 04 May 2017 10:05:40 +0000</pubDate>
		<guid isPermaLink="false">https://chrisgilligan.com/?p=349#comment-44330</guid>

					<description><![CDATA[I would like to point out that +X not only sets the execute bit on directories only, it sets on all files as well that have any other execute bit set.

So if you have something like this:

drwxr----- somedir
-rwxr----- somefile

you&#039;ll end up with:
drwx--x--x somedir
-rwx--x--x somefile

instead of the wanted:
drwx--x--x somedir
-rwx------ somefile

It depends if this is desirable or not, but you should point this out in your post.]]></description>
			<content:encoded><![CDATA[<p>I would like to point out that +X not only sets the execute bit on directories only, it sets on all files as well that have any other execute bit set.</p>
<p>So if you have something like this:</p>
<p>drwxr&#8212;&#8211; somedir<br />
-rwxr&#8212;&#8211; somefile</p>
<p>you&#8217;ll end up with:<br />
drwx&#8211;x&#8211;x somedir<br />
-rwx&#8211;x&#8211;x somefile</p>
<p>instead of the wanted:<br />
drwx&#8211;x&#8211;x somedir<br />
-rwx&#8212;&#8212; somefile</p>
<p>It depends if this is desirable or not, but you should point this out in your post.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Chris Gilligan		</title>
		<link>https://chrisgilligan.com/wordpress/chmod-recursive-files-only-directories-type/#comment-27140</link>

		<dc:creator><![CDATA[Chris Gilligan]]></dc:creator>
		<pubDate>Wed, 19 Aug 2015 11:31:35 +0000</pubDate>
		<guid isPermaLink="false">https://chrisgilligan.com/?p=349#comment-27140</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://chrisgilligan.com/wordpress/chmod-recursive-files-only-directories-type/#comment-27135&quot;&gt;Debashish&lt;/a&gt;.

Debashish, 
For each result of find, chmod {} is executed. All occurences of {} are replaced by the individual filenames found. ; is prefixed with a backslash to prevent the shell from interpreting it. ; moves to the next command. It is often used in a series of commands in scripts... see PHP or javascript. ; is also often used in a simple command line script to perform a number of commands in sequence.

See http://linux.die.net/man/1/find and look for -exec &lt;em&gt;command&lt;/em&gt; ;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://chrisgilligan.com/wordpress/chmod-recursive-files-only-directories-type/#comment-27135">Debashish</a>.</p>
<p>Debashish,<br />
For each result of find, chmod {} is executed. All occurences of {} are replaced by the individual filenames found. ; is prefixed with a backslash to prevent the shell from interpreting it. ; moves to the next command. It is often used in a series of commands in scripts&#8230; see PHP or javascript. ; is also often used in a simple command line script to perform a number of commands in sequence.</p>
<p>See <a href="http://linux.die.net/man/1/find" rel="nofollow ugc">http://linux.die.net/man/1/find</a> and look for -exec <em>command</em> ;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Debashish		</title>
		<link>https://chrisgilligan.com/wordpress/chmod-recursive-files-only-directories-type/#comment-27135</link>

		<dc:creator><![CDATA[Debashish]]></dc:creator>
		<pubDate>Wed, 19 Aug 2015 09:10:31 +0000</pubDate>
		<guid isPermaLink="false">https://chrisgilligan.com/?p=349#comment-27135</guid>

					<description><![CDATA[What is &quot;\;&quot; in your commands?]]></description>
			<content:encoded><![CDATA[<p>What is &#8220;\;&#8221; in your commands?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: assembler		</title>
		<link>https://chrisgilligan.com/wordpress/chmod-recursive-files-only-directories-type/#comment-16095</link>

		<dc:creator><![CDATA[assembler]]></dc:creator>
		<pubDate>Sun, 18 Jan 2015 09:53:37 +0000</pubDate>
		<guid isPermaLink="false">https://chrisgilligan.com/?p=349#comment-16095</guid>

					<description><![CDATA[Great cheat sheet for everyone when they are tired.]]></description>
			<content:encoded><![CDATA[<p>Great cheat sheet for everyone when they are tired.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Francis		</title>
		<link>https://chrisgilligan.com/wordpress/chmod-recursive-files-only-directories-type/#comment-5883</link>

		<dc:creator><![CDATA[Francis]]></dc:creator>
		<pubDate>Tue, 18 Sep 2012 13:45:19 +0000</pubDate>
		<guid isPermaLink="false">https://chrisgilligan.com/?p=349#comment-5883</guid>

					<description><![CDATA[So I went trawling the web for an elegant and simple solution to this and decided to write a little script for this myself. 

It basically does the recursive chmod but also provides a bit of flexibility for command line options (sets directory and/or file permissions, or exclude both it automatically resets everything to 755-644). It also checks for a few error scenarios.

Check it out:
http://bigfloppydonkeydisk.blogspot.com.au/2012/09/recursively-chmod-only-files-or.html

Hope it helps!]]></description>
			<content:encoded><![CDATA[<p>So I went trawling the web for an elegant and simple solution to this and decided to write a little script for this myself. </p>
<p>It basically does the recursive chmod but also provides a bit of flexibility for command line options (sets directory and/or file permissions, or exclude both it automatically resets everything to 755-644). It also checks for a few error scenarios.</p>
<p>Check it out:<br />
<a href="http://bigfloppydonkeydisk.blogspot.com.au/2012/09/recursively-chmod-only-files-or.html" rel="nofollow ugc">http://bigfloppydonkeydisk.blogspot.com.au/2012/09/recursively-chmod-only-files-or.html</a></p>
<p>Hope it helps!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Chris Gilligan		</title>
		<link>https://chrisgilligan.com/wordpress/chmod-recursive-files-only-directories-type/#comment-5544</link>

		<dc:creator><![CDATA[Chris Gilligan]]></dc:creator>
		<pubDate>Fri, 24 Aug 2012 19:59:33 +0000</pubDate>
		<guid isPermaLink="false">https://chrisgilligan.com/?p=349#comment-5544</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://chrisgilligan.com/wordpress/chmod-recursive-files-only-directories-type/#comment-5541&quot;&gt;Giancarlos Colasante&lt;/a&gt;.

If &lt;code&gt;ls -l&lt;/code&gt; or &lt;code&gt;ls -al&lt;/code&gt; shows d????????? then you probably should try to chmod again to 644 using the method described above, the first chmod command in this post.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://chrisgilligan.com/wordpress/chmod-recursive-files-only-directories-type/#comment-5541">Giancarlos Colasante</a>.</p>
<p>If <code>ls -l</code> or <code>ls -al</code> shows d????????? then you probably should try to chmod again to 644 using the method described above, the first chmod command in this post.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Giancarlos Colasante		</title>
		<link>https://chrisgilligan.com/wordpress/chmod-recursive-files-only-directories-type/#comment-5541</link>

		<dc:creator><![CDATA[Giancarlos Colasante]]></dc:creator>
		<pubDate>Fri, 24 Aug 2012 04:03:31 +0000</pubDate>
		<guid isPermaLink="false">https://chrisgilligan.com/?p=349#comment-5541</guid>

					<description><![CDATA[Hello, i was trying to chmod a subfolder group and i read in somewhere this command:
&quot; find -type d -print0&#124;xargs -0 chmod 644 &quot;, i useded and all my folder disappear, they are there but lost directory atribute, ls -l command return d????????? ? ? ? ?            ? _7segment/ and i can&#039;t view content. How can i repair this?]]></description>
			<content:encoded><![CDATA[<p>Hello, i was trying to chmod a subfolder group and i read in somewhere this command:<br />
&#8221; find -type d -print0|xargs -0 chmod 644 &#8220;, i useded and all my folder disappear, they are there but lost directory atribute, ls -l command return d????????? ? ? ? ?            ? _7segment/ and i can&#8217;t view content. How can i repair this?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jon Jennings		</title>
		<link>https://chrisgilligan.com/wordpress/chmod-recursive-files-only-directories-type/#comment-2919</link>

		<dc:creator><![CDATA[Jon Jennings]]></dc:creator>
		<pubDate>Thu, 21 Jul 2011 21:22:31 +0000</pubDate>
		<guid isPermaLink="false">https://chrisgilligan.com/?p=349#comment-2919</guid>

					<description><![CDATA[Excellent - thanks. That last one was what I was looking for... spent too long trying to escape filenames containing spaces &#038; hyphens into chmod with something like
   chmod 640 $(find . -name *.php)
but your way works perfectly.]]></description>
			<content:encoded><![CDATA[<p>Excellent &#8211; thanks. That last one was what I was looking for&#8230; spent too long trying to escape filenames containing spaces &amp; hyphens into chmod with something like<br />
   chmod 640 $(find . -name *.php)<br />
but your way works perfectly.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>

<!--
Page Caching using Disk: Enhanced 
Content Delivery Network via Amazon Web Services: CloudFront: d2lehxir4n36oh.cloudfront.net
Lazy Loading (feed)

Served from: chrisgilligan.com @ 2026-02-25 19:02:45 by W3 Total Cache
-->