[Novalug] Sample shell code...

Angelo Bertolli angelo at freeshell.org
Fri Feb 23 16:58:49 EST 2007


donjr wrote:
> On Fri, 2007-02-23 at 14:19 -0500, Angelo Bertolli wrote:
>
>   
>> Also, I think since we're talking about this, it's really really 
>> important to mention that people never ever use chmod -r, instead using 
>> chmod -R for recursive changes. I have absolutely NO IDEA why chmod -r 
>> includes the .. directory! No other command I know of does this, and it 
>> seem so incredibly stupid and dangerous. Also, what is the point? Why on 
>> earth would recursion simply just do every file on the system?
>>
>> Angelo
>>     
>
> Why would '-r' mean recursion to 'chmod' and/or mean to included (or
> not) the ..(current) directory?
>
> The '-r' option as in 'chmod -r filename' means:
>   Remove ALL READ Permissions from the given file name and it's the same
> as if the user issued the command 'chmod a-r filename'
>
> Nothing seems strange about this..
>   
I must be losing my mind.  I could have sworn I used chmod or chown 
before with a -r option that included recursion into the parent 
directory.  Does anyone know what I'm talking about?

Angelo




More information about the Novalug mailing list