From owner-freebsd-questions@FreeBSD.ORG Wed Jun 28 07:12:56 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 74D4116A50D for ; Wed, 28 Jun 2006 07:12:56 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9AD9B45709 for ; Tue, 27 Jun 2006 21:33:37 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.pc (host5.bedc.ondsl.gr [62.103.39.229]) (authenticated bits=128) by igloo.linux.gr (8.13.7/8.13.7/Debian-1) with ESMTP id k5RLXHPc030789 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 28 Jun 2006 00:33:18 +0300 Received: from gothmog.pc (gothmog [127.0.0.1]) by gothmog.pc (8.13.7/8.13.7) with ESMTP id k5RLXAcK002922; Wed, 28 Jun 2006 00:33:10 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.pc (8.13.7/8.13.7/Submit) id k5RLXASt002921; Wed, 28 Jun 2006 00:33:10 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Wed, 28 Jun 2006 00:33:10 +0300 From: Giorgos Keramidas To: sara lidgey Message-ID: <20060627213310.GA2889@gothmog.pc> References: <20060627181422.6917.qmail@web35702.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060627181422.6917.qmail@web35702.mail.mud.yahoo.com> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-3.47, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.93, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-questions@freebsd.org Subject: Re: multiple links with single ln command X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2006 07:12:56 -0000 On 2006-06-27 14:14, sara lidgey wrote: > Hi All, > > I've read the man page for ln but can't find a way to do this. I want > to create multiple links to a single directory with one command. > Consider the following example. I have a directory structure like > this: > > test/a/ > test/b/ > test/c/ > > I want to create a symbolic link called "clink" in test/a/ and test/b/ > which points to test/c/ > > The only way I know to do this is with two commands: > ln -s test/c test/a/clink > ln -s test/c test/b/clink > > Can it be done with a single command? I don't think so. The closest you can come to ``a single command'' would be a loop: $ for dirname in a b ; do ln -s test/c "test/$dirname/clink" ; done