[Gllug] How to chmod selectively without writing a script
Liad Bokovsky
lbokovsk at akamai.com
Tue Oct 1 14:13:54 UTC 2002
On Tue, Oct 01, 2002 at 01:01:15PM +0100 , Rhys Hopkins mentioned that:
>try :
>
>find . -type d -exec chmod 755 {} \; # finds directories and applies chmod
>find . -type f -exec chmod 644 {} \; # finds regular files and applies
>chmod
as an old dog, I'm still using one of the old tricks I've learnt.
find . -type d |xargs chmod 755 - for directories and sub-dirs'
find . -type f |xargs chmod 644 - for files
>
>Regards,
>
>Rhys.
>
>
>
>> -----Original Message-----
>> From: Garry Heaton [mailto:garry at heaton6.freeserve.co.uk]
>> Sent: 01 October 2002 13:06
>> To: gllug at linux.co.uk
>> Subject: [Gllug] How to chmod selectively without writing a script
>>
>>
>> I want to be able to change the permissions on subdirectories without
>> changing the contents of those directories. So far I've tried
>>
>> chmod -R 755 */
>>
>> ... but this changes all the files to 755.
>>
>> I want the files in all the subdirectories to be set to 644 so I tried
>>
>> chmod -R 644 *.*
>>
>> ... but this only affects the current directory. I've tried
>> starting with:
>>
>> chmod -R 644 *
>> chmod -R 755 */
>>
>> This initially changes all the files and directories to 644 but then
>> everything goes to 755. This being the case, why does
>>
>> chmod -R 644 *
>>
>> ... affect all subdirectory files while
>>
>> chmod -R 644 *.* only affects the current directory?
>>
>> Garry Heaton
>>
>>
>> --
>> Gllug mailing list - Gllug at linux.co.uk
>> http://list.ftech.net/mailman/listinfo/gllug
>>
>
>
>***********************************************************************************************************
>Visit us at http://www.culver-tec.com
>
>DISCLAIMER & CONFIDENTIALITY NOTICE
>
>This email and any files transmitted with it are confidential and intended solely for the use
>of the individual or entity to whom they are addressed. This communication may contain
>privileged material. If you are not the intended recipient or the person responsible for
>delivering the email to the intended recipient, please be advised that you have received
>this email in error and that any use, dissemination, forwarding, printing or copying of this
>email is strictly prohibited.
>
>The content of this email and any files transmitted with it may not reflect the views and
>opinions of the originating company. If you have received this email in error, please
>telephone +44 (020) 7456 1300 immediately.
>The contents of this email are subject to the terms and conditions of use of our Websites.
>No inappropriate content of any sort in this email is approved by us.
>If you have any queries or complaints, please forward this email to complaints at culver-tec.com
>***********************************************************************************************************
>
>
>--
>Gllug mailing list - Gllug at linux.co.uk
>http://list.ftech.net/mailman/listinfo/gllug
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list