From owner-freebsd-questions Thu May 9 23:28:22 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id XAA20023 for questions-outgoing; Thu, 9 May 1996 23:28:22 -0700 (PDT) Received: from apollo.is.co.za (apollo.is.co.za [196.4.160.2]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id XAA20003 for ; Thu, 9 May 1996 23:28:18 -0700 (PDT) Received: from admin.is.co.za (admin.is.co.za [196.23.0.9]) by apollo.is.co.za (8.7.5/8.7.5/IShub#2) with ESMTP id IAA20354; Fri, 10 May 1996 08:28:15 +0200 (GMT) Received: (from robin@localhost) by admin.is.co.za (8.7.5/8.7.5/ISsubsidiary#1) id IAA02818; Fri, 10 May 1996 08:28:14 +0200 (GMT) From: Robin Lunn Message-Id: <199605100628.IAA02818@admin.is.co.za> Subject: Re: running gag: chmod -R .\* To: garth@dogbert.systems.sa.gov.au (Garth Kidd) Date: Fri, 10 May 1996 08:28:13 +0200 (GMT) Cc: questions@freefall.freebsd.org In-Reply-To: <960510143531.ZM2871@jolt.systems.sa.gov.au> from "Garth Kidd" at May 10, 96 02:16:23 pm X-Organisation: The Internet Solution (Pty) Ltd. X-Phone: +27-11-4475566; Fax: +27-11-4475567 Reply-To: robin@is.co.za X-AIDAT-Member: See http://www.aidat.org X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Garth Kidd wrote: > > Unless the argument list is too long. :-( > > > > ls -A | xargs chmod 0644 -R ls -A shows directory names with a : before listing the files. > Aah, but what about .files in subdirectories? > > #!/bin/csh > foreach a (`find . -type d -print`) > cd $a > chmod 0644 `/bin/ls -1Ad` > end > > Note that find won't follow symlinked directories, which is probably a good > thing. find . -type f -exec chmod 0644 {} \; This finds all files and ignores directories like .. and such. It doesn't depend on any shell either. -- _ __ | Only my ideas here unless I say otherwise... ' ) ) / | (BeamJack@IRC) /--' ____/___o __ | "Nondum amabam, et amare amabam... quaerebam / \_(_) /_) (__/) )_ | quid amarem, amans amare." - St Augustine