home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!sun-barr!male.EBay.Sun.COM!exodus.Eng.Sun.COM!bodacia!patl
- From: patl@bodacia.Eng.Sun.COM (Pat Lashley)
- Newsgroups: comp.lang.perl
- Subject: Re: Help -- why doesn't it work?
- Date: 23 Dec 1992 00:22:46 GMT
- Organization: Sun Microsystems, Inc.
- Lines: 27
- Distribution: world
- Message-ID: <ljfcamINNvn@exodus.Eng.Sun.COM>
- References: <1992Dec8.141905.35130@Lehigh.EDU>
- Reply-To: patl@bodacia.Eng.Sun.COM
- NNTP-Posting-Host: bodacia
-
- In article 35130@Lehigh.EDU, lusol@Lehigh.EDU (Stephen O. Lidie) writes:
- |>Too many backslashes.... you just need two:
- |>
- |>system("find . -user $olduid -exec chown $newuid {} \\;");
- |>
- |>Might need a space after the {} as well - I do on AIXches.
- |>
- |>
- |>Just anovice Perl hacker,
-
- If you have xargs, it is usually better to use:
-
- system ("find . -user $olduid -print | xargs chown $newuid");
-
- Using -exec forks a chown process for every file found; but xargs will
- append several file names to each chown process.
-
-
-
- -Pat
-
-
-
- ---
- PMLashley plashley@Sun.COM SunSoft:NeWS/TNT
- "Those who do not understand NeWS are doomed to recreate it - badly"
-
-