Mail Archives: djgpp-workers/2002/06/11/06:35:25
Hello.
DJ Delorie wrote:
>
> > unlink: removes the symlink, i.e. doesn't dereference the symlink
> > remove: removes the target of the symlink, i.e. resolves the symlink
>
> No. Linux (and every other *nix I can remember) doesn't do this -
> it's always the symlink that's removed, never the target. I don't
> think there *is* a way to remove the target of a symlink without
> reading the symlink yourself and figuring out what it's pointing to.
Yes. Here's what draft 7 of the Austin Group's new POSIX standard says about
remove on page 1702 of the System Interfaces manual:
"If path does not name a directory, remove(path) shall be equivalent to
unlink(path).
If path names a directory, remove(path) shall be equivalent to rmdir(path)."
Thanks, bye, Rich =]
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -