Path: utzoo!utgpu!watserv1!watmath!att!pacbell!pacbell.com!ames!ucsd!swrinde!zaphod.mps.ohio-state.edu!wuarchive!udel!udccvax1!mccalpin From: mccalpin@vax1.acs.udel.EDU (John D Mccalpin) Newsgroups: comp.sys.sgi Subject: Re: chown thru multiple directories Message-ID: <6717@vax1.acs.udel.EDU> Date: 10 Jul 90 14:18:40 GMT References: <9007072013.AA25848@mcirps2.med.nyu.edu> Reply-To: mccalpin@vax1.udel.edu (John D Mccalpin) Organization: College of Marine Studies, Univ. of Delaware Lines: 26 JORDAN%gmr.com@relay.cs.net asks about "chown thru multiple directories" >>Is there a command available that will change the owner and group >>of every file in the current directory, and every file & directory >>below the current directory? In article karron@MCIRPS2.MED.NYU.EDU writes: > >find /$startdir -exec chown $username "{}" \; -print > >karron@nyu.edu Dan Karron Although this is not an SGI-specific issue, I would like to point out that this approach can be *very* slow for large directory trees since the 'find' program forks off a 'chown' program for each file that it finds. A much more efficient approach is to use xargs: find . -print | xargs chown $username This will bundle up the names into larger groups and call 'chown' on the groups. -- John D. McCalpin mccalpin@vax1.udel.edu Assistant Professor mccalpin@delocn.udel.edu College of Marine Studies, U. Del. mccalpin@scri1.scri.fsu.edu