[CentOS] Overwrite target of ln

Matt Arnilo S. Baluyos (Mailing Lists) matt.baluyos.lists at gmail.com
Wed Mar 5 00:23:10 UTC 2008


On 05/03/2008, Michael D. Kralka <michael.kralka at kvs.com> wrote:
> Matt Arnilo S. Baluyos (Mailing Lists) wrote:
>  > On 05/03/2008, Matt Arnilo S. Baluyos (Mailing Lists)
>  > <matt.baluyos.lists at gmail.com> wrote:
>  >> On 05/03/2008, Garrick Staples <garrick at usc.edu> 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

Great! Working now. Thanks.

I've read the man page but didn't understand that option to be what
I'm looking for.

-- 
Stand before it and there is no beginning.
Follow it and there is no end.
Stay with the ancient Tao,
Move with the present.



More information about the CentOS mailing list