From owner-freebsd-questions Fri Feb 2 16: 5:15 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mailhost01.reflexnet.net (mailhost01.reflexnet.net [64.6.192.82]) by hub.freebsd.org (Postfix) with ESMTP id BEBC037B491 for ; Fri, 2 Feb 2001 16:04:58 -0800 (PST) Received: from rfx-216-196-73-168.users.reflexcom.com ([216.196.73.168]) by mailhost01.reflexnet.net with Microsoft SMTPSVC(5.5.1877.197.19); Fri, 2 Feb 2001 16:03:08 -0800 Received: (from cjc@localhost) by rfx-216-196-73-168.users.reflexcom.com (8.11.1/8.11.1) id f1304Mv38132; Fri, 2 Feb 2001 16:04:22 -0800 (PST) (envelope-from cjc) Date: Fri, 2 Feb 2001 16:04:21 -0800 From: "Crist J. Clark" To: Arcady Genkin Cc: dannyman , freebsd-questions@FreeBSD.ORG Subject: Re: Change group ID in a shell script Message-ID: <20010202160421.W91447@rfx-216-196-73-168.users.reflex> Reply-To: cjclark@alum.mit.edu References: <87vgqteb00.fsf@tea.thpoon.com> <20010202004144.A30084@dell.dannyland.org> <87r91hea7x.fsf@tea.thpoon.com> <20010202005517.B307@dell.dannyland.org> <87lmrpe7kv.fsf@tea.thpoon.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <87lmrpe7kv.fsf@tea.thpoon.com>; from a.genkin@utoronto.ca on Fri, Feb 02, 2001 at 04:51:28AM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Feb 02, 2001 at 04:51:28AM -0500, Arcady Genkin wrote: > dannyman writes: > > > On Fri, Feb 02, 2001 at 03:54:26AM -0500, Arcady Genkin wrote: > > > No, I chgrp is not what I want. I'm running rsync to mirror a > > > directory over network, so rsync can potentially create a bunch of new > > > files. > > > > rsync -g? > > Nope, this means "preserve group". The remote group and local group > names do not coinside. > > I solved the problem by writing a Perl script instead of a shell > script (using Perl's `setpgrp'). I would still like to know how I > could do that in a shell script, though. It does not seem like it would matter for your purposes. The group ID of a newly created file has nothing to do with the group of the user creating it (aside from possibly giving permissions to write the file) on a BSD system. -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message