Date: Tue, 17 Jun 1997 01:24:43 +0100 From: Brian Somers <brian@awfulhak.org> To: Christopher G Mann <r3cgm@cdrom.com> Cc: questions@FreeBSD.ORG Subject: Re: ln behavior Message-ID: <199706170024.BAA12611@awfulhak.demon.co.uk> In-Reply-To: Your message of "Sun, 15 Jun 1997 16:36:55 PDT." <199706152336.QAA04048@pooh.cdrom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> Greetings...
>
> I'm curious why the "-f" parameter for "ln" does not work with directories
> under FreeBSD 2.2.x.
>
> I.e. Files work...
[.....]
> But Directories don't...
>
> [hornet : r3cgm] ~/test - mkdir dir1 dir2
>
> drwxr-xr-x 2 r3cgm r3cgm 512 Jun 15 15:34 dir1/
> drwxr-xr-x 2 r3cgm r3cgm 512 Jun 15 15:34 dir2/
>
> [hornet : r3cgm] ~/test - ln -s dir1 dir.symbolic
>
> lrwxr-xr-x 1 r3cgm r3cgm 4 Jun 15 15:34 dir.symbolic@ -> dir1
> drwxr-xr-x 2 r3cgm r3cgm 512 Jun 15 15:34 dir1/
> drwxr-xr-x 2 r3cgm r3cgm 512 Jun 15 15:34 dir2/
>
> [hornet : r3cgm] ~/test - ln -fs dir2 dir.symbolic
>
> lrwxr-xr-x 1 r3cgm r3cgm 4 Jun 15 15:34 dir.symbolic@ -> dir1 <-- Bzzt!
> drwxr-xr-x 2 r3cgm r3cgm 512 Jun 15 15:34 dir1/
> drwxr-xr-x 2 r3cgm r3cgm 512 Jun 15 15:34 dir2/
>
> I can't seem to find anything in the man pages that indicates why ln would
> behave this way.
>
> Looking forward to your reply..
Hmm, from the man page:
Given one or two arguments, ln creates a link to an existing file
source_file. If target_file is given, the link has that name; target_file
may also be a directory in which to place the link; otherwise it is
placed in the current directory. If only the directory is specified, the
link will be made to the last component of source_file.
You've created "dir.symbolic/dir2 -> dir2".
> --
> Christopher G. Mann - r3cgm@cdrom.com
> Walnut Creek CDROM
--
Brian <brian@awfulhak.org>, <brian@freebsd.org>
<http://www.awfulhak.org>
Don't _EVER_ lose your sense of humour....
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706170024.BAA12611>
