Thread View: comp.unix.shell
3 messages
3 total messages
Started by Frank P. Bresz
Thu, 20 Dec 1990 17:05
Setting (Recursively) Modes on Files
Author: Frank P. Bresz
Date: Thu, 20 Dec 1990 17:05
Date: Thu, 20 Dec 1990 17:05
23 lines
1263 bytes
1263 bytes
Hi, I often have the case where I want to open up an area of a directory to group access. However I am using SCCS and have many files that should remain read only. A mindless chmod -R g+w . Trashes the sanctity of SCCS by making some things group writable while they aren't user writable. How can I cleanly execute this command? awk/sed/sh/find (or whatever) accepted Please no PERL or CSH. SunOS4.1 (but please don't make it specific to that platform) -- | () () () | Frank P. Bresz | Westinghouse Electric Corporation | \ /\ / | fpb@ittc.wec.com | ITTC Simulators Department | \/ \/ | uunet!ittc!fpb | Those who can, do. Those who can't, simulate. | ---------- | +1 412 733 6749 | My opinions are mine, WEC don't want 'em.
Re: Setting (Recursively) Modes on Files
Author: Kartik Subbarao
Date: Thu, 20 Dec 1990 20:25
Date: Thu, 20 Dec 1990 20:25
34 lines
1315 bytes
1315 bytes
In article <FPB.90Dec20120534@ittc.ittc.wec.com> fpb@ittc.wec.com (Frank P. Bresz) writes:
>
>Hi,
> I often have the case where I want to open up an area of a
>directory to group access. However I am using SCCS and have many files
>that should remain read only. A mindless
>
> chmod -R g+w .
>
> Trashes the sanctity of SCCS by making some things group writable
>while they aren't user writable.
>
> How can I cleanly execute this command?
>
> awk/sed/sh/find (or whatever) accepted
Find seems up to this task.
To add group read & write permissions to any file here or lower that's
writable to the user:
find . -perm -0600 -exec chmod g+rw "{}" \;
-Kartik
--
internet# ls -alR | grep *.c
subbarao@{phoenix or gauguin}.Princeton.EDU -|Internet
kartik@silvertone.Princeton.EDU (NeXT mail) -|
SUBBARAO@PUCC.BITNET - Bitnet
Re: Setting (Recursively) Modes on Files
Author: Wm E. Davidsen Jr
Date: Thu, 27 Dec 1990 03:04
Date: Thu, 27 Dec 1990 03:04
16 lines
1244 bytes
1244 bytes
In article <5389@cuuxb.ATT.COM> dmeeks@cuuxb.UUCP (David L. Meeks) writes:
| sure all arguments to 'find' are white-space separated. I believe
| one could also use:
|
| find . -type f ! -name "s.*" ! -name "p.*" -print |xargs chmod g+w
|
| which would also eliminate the 'p.' files from the list.
Or ! -name '[sp].*' since these are glob format wildcards on names
(shell rules, not regular expressiln rules).
--
bill davidsen - davidsen@sixhub.uucp (uunet!crdgw1!sixhub!davidsen)
sysop *IX BBS and Public Access UNIX
moderator of comp.binaries.ibm.pc and 80386 mailing list
"Stupidity, like virtue, is its own reward" -me
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads