bug-coreutils
[Top][All Lists]
Advanced

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

Re: Symbolic link problem


From: Bob Proulx
Subject: Re: Symbolic link problem
Date: Fri, 7 Dec 2007 09:39:17 -0700
User-agent: Mutt/1.5.13 (2006-08-11)

Andreas Schwab wrote:
> Eric Blake <address@hidden> writes:
> > Use -T (a GNU extension, not available in all ln implementations)
> > to guarantee the first form.
> 
> ln -sn is more widely available.

If portability is a concern then the only option is remove the target
first.  SysV based systems do not have the -n option.  Your example:

  mkdir targ
  ln -s targ src
  ll -rt
  drwxr-xr-x  2 cwbspr2 wbspr2   4096 Dec  6 15:49 targ
  lrwxrwxrwx  1 cwbspr2 wbspr2      4 Dec  6 15:49 src -> targ

Would then be like this:

  rm -f src
  mkdir targ
  ln -s targ src

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]