Date: Fri, 10 May 1996 14:16:23 +0930 From: Garth Kidd <garth@dogbert.systems.sa.gov.au> To: questions@freefall.freebsd.org Subject: running gag: chmod -R .\* Message-ID: <960510143531.ZM2871@jolt.systems.sa.gov.au> In-Reply-To: owner-questions-digest@freefall.freebsd.org "questions-digest V1 #828" (May 9, 12:07) References: <199605091907.MAA04692@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> chmod 644 -R .??*
>>>> I prefer chmod 644 -R .[a-zA-Z]* myself
>>># chmod 644 -R .[^.]* *
>>>
>>>(csh at least)
>> All shells, and no compilcated [] expresssions:-
>>
>> chmod 0644 -R `ls -A`
>> does _exactly what's required.
> Unless the argument list is too long. :-(
>
> ls -A | xargs chmod 0644 -R
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.
--
garth@dogbert.systems.sa.gov.au | Garth Kidd
+61-8-207-7740 (voice) | Network Services Branch
+61-8-207-7860 (fax) | Southern Systems
| Adelaide, AUSTRALIA
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?960510143531.ZM2871>
