tar currently doesn't seem to be following symlinks when extracting, but overwriting them. For example: cd /usr/src mkdir temp ln -s temp linux tar xzf linux-2.3.99-pre3.tar.gz ...and you end up with linux as a real directory, instead of the files being put in temp. Am I on crack? - tested on a NetBSD box and this worked as expected. - Andy
I think the rationale is this: If a file in a tar file is a symbolic link, it will be extracted as a symbolic link. Otherwise, it won't. ;-)
I confirm. If a file into a tar is in a directory, and that directory on the system is a symlink, tar overwrites the link and changes it into a directory when you extract the file. Tested on a RH 5.2, it doesn't do that and follows well the symlink. It's probably a bug of gnu tar 1.13.17.
I suspect it's a posix compliacne fix actually... I'll check.
Yes, it's a POSIX feature, not a bug.