Re: Overwrite target of ln

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Matt Arnilo S. Baluyos (Mailing Lists) wrote:
On 05/03/2008, Matt Arnilo S. Baluyos (Mailing Lists)
<matt.baluyos.lists@xxxxxxxxx> wrote:
On 05/03/2008, Garrick Staples <garrick@xxxxxxx> wrote:
 I have just tried using a target as a file and it does seem to work
 with the -f option. It's only when the target is a directory that it
 fails:

 $ ll
 drwxrwxr-x 2 matt matt 4096 Mar  4 14:34 dir1
 drwxrwxr-x 2 matt matt 4096 Mar  4 14:34 dir2
 lrwxrwxrwx 1 matt matt    4 Mar  4 14:35 link -> dir1

 $ ln -s dir2 link

That should be:

$ ln -sf dir2 link

from the ln man page:

-n, --no-dereference
	treat destination that is a symlink to a directory as if it
	were a normal file

Cheers,
Michael
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux