Date: Fri, 10 May 1996 15:16:15 +0200 (GMT) From: Robin Lunn <robin@is.co.za> To: mac@nibsc.ac.uk Cc: robin@is.co.za, garth@dogbert.systems.sa.gov.au, questions@freefall.freebsd.org Subject: Re: running gag: chmod -R .\* Message-ID: <199605101316.PAA00755@admin.is.co.za> In-Reply-To: <199605101301.OAA17256@chalsig.nibsc.ac.uk> from "mac@nibsc.ac.uk" at May 10, 96 02:01:38 pm
next in thread | previous in thread | raw e-mail | index | archive | help
mac@nibsc.ac.uk wrote: > >find . -type f -exec chmod 0644 {} \; > > > >This finds all files and ignores directories like .. and such. It doesn't > >depend on any shell either. > > [Misses device specials etc. maybe a good thing, but we're here for the total > solution] Just add a "-a type X" where X is the type you also want changed. The find command is really not that hard. `man find` If you only want to miss directories then: find . '!' -type d -exec chmod 644 {} \; > Which all brings me to my final thought. Given that '-R' is smart about .files > in subdirectories listed on the command line, we can use this:- > > chmod -R 0644 . > > as a replacement for the otherwise excellent ls -A | xargs chmod That changes directory permissions... Directories with 644 permissions aren't that popular, but thats a matter of taste. -- _ __ | Only my ideas here unless I say otherwise... ' ) ) / | (BeamJack@IRC) /--' ____/___o __ | "Nondum amabam, et amare amabam... quaerebam / \_(_) /_) (__/) )_ | quid amarem, amans amare." - St Augustine
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605101316.PAA00755>