[CLUE-Tech] Symlink oddity
Matt Gushee
mgushee at havenrock.com
Tue Jun 25 11:22:08 MDT 2002
I just discovered that bash (or maybe it's ls and mv) has some peculiar
behavior WRT to symlinked directories.
I downloaded a file called popy-2.0.7.tar.gz (it's a PostgreSQL interface
for Python) to /usr/local/share, when I actually wanted it in
/usr/local/src. On my system, by the way:
bash-2.03$ file /usr/local
/usr/local: symbolic link to /opt/usr.local
and
bash-2.03$ file /usr/local/src
/usr/local/src: symbolic link to /.devel/usr.local.src
[okay, my partitioning scheme is a little odd, but I have my reasons]
So I do this:
bash-2.03$ cd /usr/local/src
bash-2.03$ mv ../sh [TAB] -->
mv ../share
mv ../share/po [TAB] -->
mv ../share/popy-2.0.7.tar.gz .
and get:
mv: ../share/popy-2.0.7.tar.gz: No such file or directory
Well, that's understandable, since there isn't a /.devel/share
directory. And if I try to do
$ ls ../share
it fails in a similar fashion. Why, then, does ../share/, etc. appear
through tab completion? Is this a bug in bash, or is it intentional? If
it's intentional, what good is it to be able to do tab completion on
paths that don't actually exist?
Inquiring minds want 2 no ...
--
Matt Gushee
Englewood, Colorado, USA
mgushee at havenrock.com
http://www.havenrock.com/
More information about the clue-tech
mailing list