Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!elroy.jpl.nasa.gov!zardoz.cpd.com!dhw68k!fedeva!dynasys!jessea From: jessea@dynasys.UUCP (Jesse W. Asher) Newsgroups: comp.unix.questions Subject: Re: Recursion without -R Keywords: recursion Message-ID: <316@dynasys.UUCP> Date: 18 Aug 90 01:13:28 GMT References: <494@llnl.LLNL.GOV> <13595@ulysses.att.com> Reply-To: jessea@dynasys.UUCP () Organization: Dynasys: Consulting for the Future. Lines: 22 In article <13595@ulysses.att.com>, swfc@ulysses.att.com (Shu-Wie F Chen) wrote the following: >In article <494@llnl.LLNL.GOV>, rjshaw@ramius.ocf.llnl.gov (Robert Shaw) >writes: >|>Hi. >|> >|>What are some quick tricks for getting programs like chmod and chown to >|>descend into all subdirectories? Programs without a -R option, that is. >find . -print | xargs chown foo >Of course, this only works if you have xargs, which is from System V and >is also available on SunOS in their System V software installation option. Why not just use "find . -exec chown foo {} \;" Or if you have to do many different commands, use: for x in `find . -print` do chown foo $x chgrp foobar $x chmod 644 $x done This can be done from the command line and saves some time.