The sequence find ..... -exec seems safe enough though. I suspect it just uses the inode numbers rather than the file name or something (but beware this is on Solaris ;) bash-2.05$ find thingy -type f -exec file {} \; thingy/one/this: empty file thingy/two/; file thingy: empty file thingy/three/that: empty file bash-2.05$ ls -lR thingy thingy: total 6 drwxrwxr-x 2 rowling staff 512 Aug 12 17:22 one drwxrwxr-x 2 rowling staff 512 Aug 12 17:22 three drwxrwxr-x 2 rowling staff 512 Aug 12 17:22 two
thingy/one: total 0 -rw-rw-r-- 1 rowling staff 0 Aug 12 17:22 this thingy/three: total 0 -rw-rw-r-- 1 rowling staff 0 Aug 12 17:22 that thingy/two: total 0 -rw-rw-r-- 1 rowling staff 0 Aug 12 17:22 ; file thingy bash-2.05$ - Jill -- Jill Rowling, System Administrator Eng. Systems Dept, Aristocrat Technologies Australia Level 2, 55 Mentmore Ave Rosebery NSW 2018 Phone: (02) 9697-4484 Fax: (02) 9663-1412 Email: [EMAIL PROTECTED] -----Original Message----- From: Andrew McNaughton [mailto:[EMAIL PROTECTED] Sent: Tuesday, 12 August 2003 5:08 PM To: Norman Gaywood Cc: [EMAIL PROTECTED]; Ram Smith Subject: Re: [SLUG] recursively change file permissions not directories On Tue, 12 Aug 2003, Norman Gaywood wrote: > Date: Tue, 12 Aug 2003 12:50:01 +1000 > From: Norman Gaywood <[EMAIL PROTECTED]> > To: Ram Smith <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] > Subject: Re: [SLUG] recursively change file permissions not > directories > > On Tue, Aug 12, 2003 at 11:32:06AM +1000, Ram Smith wrote: > > I have a shared directory structure where alot of the files in each > > directory have permisions of 644 I wanting to change it so that the > > files are chmod 664 letting all users in the group read and write to > > the data. without nuking the permissions on the directories along > > with the files. > > The way to do this properly, as others are showing, is with a: > > find . -type f | xargs chmod 644 This is not doing things properly and is highly dangerous. eg: [EMAIL PROTECTED] touch ";chmod u+sx" [ some time later ] [EMAIL PROTECTED] find . -type f | xargs chmod 644 Andrew McNaughton -- No added Sugar. Not tested on animals. May contain traces of Nuts. If irritation occurs, discontinue use. ------------------------------------------------------------------- Andrew McNaughton In Sydney Working on a Product Recommender System [EMAIL PROTECTED] Mobile: +61 422 753 792 http://staff.scoop.co.nz/andrew/cv.doc -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug ---------------------------------------------------------------------- IMPORTANT NOTICES This email (including any documents referred to in, or attached, to this email) may contain information that is personal, confidential or the subject of copyright or other proprietary rights in favour of Aristocrat, its affiliates or third parties. This email is intended only for the named addressee. Any privacy, confidence, copyright or other proprietary rights in favour of Aristocrat, its affiliates or third parties, is not lost because this email was sent to you by mistake. If you received this email by mistake you should: (i) not copy, disclose, distribute or otherwise use it, or its contents, without the consent of Aristocrat or the owner of the relevant rights; (ii) let us know of the mistake by reply email or by telephone (+61 2 9413 6300); and (iii) delete it from your system and destroy all copies. Any personal information contained in this email must be handled in accordance with applicable privacy laws. Electronic and internet communications can be interfered with or affected by viruses and other defects. As a result, such communications may not be successfully received or, if received, may cause interference with the integrity of receiving, processing or related systems (including hardware, software and data or information on, or using, that hardware or software). Aristocrat gives no assurances in relation to these matters. If you have any doubts about the veracity or integrity of any electronic communication we appear to have sent you, please call +61 2 9413 6300 for clarification. -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug