From owner-freebsd-questions@FreeBSD.ORG Wed Jun 28 16:12:22 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 F003016A407 for ; Wed, 28 Jun 2006 16:12:21 +0000 (UTC) (envelope-from slidgey@yahoo.ca) Received: from web35705.mail.mud.yahoo.com (web35705.mail.mud.yahoo.com [66.163.179.159]) by mx1.FreeBSD.org (Postfix) with SMTP id 79A9943D79 for ; Wed, 28 Jun 2006 16:12:21 +0000 (GMT) (envelope-from slidgey@yahoo.ca) Received: (qmail 93910 invoked by uid 60001); 28 Jun 2006 16:12:20 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=vizIGA/4QssklBmCTpVuYOTX/lIorwVRvDcHbcJJc+uu0LXjT9u4LjHFmR9AXHCLYdYp/nS5LwnMR3QKmb86ciGLgWnZzHUlCx+Kvz5Q5v50GE6NpmLnmHPwgH9GdVruux+7aGhOu9Muodqz4J0Fk0qwNklZhJBjenV2YqPXVo4= ; Message-ID: <20060628161220.93908.qmail@web35705.mail.mud.yahoo.com> Received: from [129.173.68.207] by web35705.mail.mud.yahoo.com via HTTP; Wed, 28 Jun 2006 12:12:20 EDT Date: Wed, 28 Jun 2006 12:12:20 -0400 (EDT) From: sara lidgey To: Brian O'Shea , freebsd-questions@freebsd.org In-Reply-To: <20060627231910.52369.qmail@web39505.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: 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 16:12:22 -0000 Thanks for all the ideas. They are very helpful. -S Brian O'Shea wrote: It can be done with a shell for-loop: $ mkdir a b c $ for dir in a b ; do (cd $dir ; ln -s ../c clink) ; done But this is technically not a single command, and it assumes that you are using the Bourne Shell (/bin/sh) or a Bourne-compatible shell (ksh, zsh, bash, etc.). If you are a csh or tcsh user, may God help you. (I mean look up the syntax in the appropriate man page.) -brian --- 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? > > thanks. sorry if this is a no-brainer, > S __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" --------------------------------- Make free worldwide PC-to-PC calls. Try the new Yahoo! Canada Messenger with Voice