Skip site navigation (1)Skip section navigation (2)
Date:      25 Jun 2000 05:53:45 +0200
From:      Cyrille Lefevre <clefevre@no-spam.citeweb.net>
To:        fs@FreeBSD.ORG
Cc:        hacker@FreeBSD.ORG
Subject:   strange symlink behaviour if / terminated
Message-ID:  <em5mxvp1.fsf@pc166.gits.fr>

next in thread | raw e-mail | index | archive | help

preliminaries :

# mkdir -p /path/name /path/to
# touch /path/name/file
# ln -s /path/name /path/to/symlink

# mv /path/to/symlink/ /other/location
                     ^ note the terminating slash.

move the target of the symlink instead of the symlink itself.

same results w/ rm -r and cp -r.

slightly different results w/ rm and cp.

# rm /path/to/symlink/
rm: /path/to/symlink/: is a directory
# cp /path/to/symlink/ /other/location
cp: /path/to/symlink/ is a directory (not copied).

# rmdir -p /path/to/symlink/

remove the symlink itself instead of do nothing, such as in :

# rmdir -p /path/to/symlink
rmdir: /path/to/symlink: Not a directory

also, strange output from rmdir -p :

# mkdir -p /path/name
# rmdir -p /path/name
rmdir: : No such file or directory
# mkdir -p /path/name/
# rmdir -p /path/name/
rmdir: /path/name: No such file or directory

I don't have done these tests under some other OSes (HP-UX, Solaris, IRIX)
yet, but I'm sure that they do nothing or they work on symlink itself instead
of the target.

Cyrille.
-- 
home:mailto:clefevre@no-spam.citeweb.net Supprimer "no-spam." pour me repondre.
work:mailto:Cyrille.Lefevre@no-spam.edf.fr Remove "no-spam." to answer me back.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?em5mxvp1.fsf>