Forums / Install & configuration / How can I translate symbolic links from Unix onto Windows ?
Nick Woods
Sunday 07 March 2004 2:02:03 pm
I need to know how to convert symbolic links in a Unix tar file so that they can be used on Windows XP
I'm taken a copy of my live website (which is on Unix) by dumping the mysql database and tar'ing up the var directory, after copying to my PC and installing it the site works correctly apart from a problem with images.
I traced this to the fact that ezp uses symbolic links to refer back to an image on a unix box when an article has changed. In other words it creates a new directory for the article but in that directory it creates a symbolic link pointing back to the original
So, what I need is a way of either converting the links to 'proper' files on the Unix box or converting them to windows shortcuts on the XP box.
Neither winzip or powerchiver seem able to do this, so can anyone suggest a solution ?
Derick Rethans
Monday 08 March 2004 12:48:48 am
AFAIK there is no way for symlinks on Windows, but the -h option of tar will make copies of the files instead of putting the symlinks in the archive. That should do the trick.
Tuesday 09 March 2004 12:42:59 am
Thanks Derick, but I tried this but with no luck :-tar hcf 2004_03_08_01.v3.tar /home/virtual/site6/fst/home/webmaster/mainwebsite_html/var
i then dumped the contents to a filetar tvf 2004_03_08_01.v3.tar > 2004_03_08_01.v2.tar.gz.txt
had a look for a file that I know is causing me troublegrep woodsnick.jpg 2004_03_08_01.v2.tar.gz.txt
and it still says its a link not a file -rw-rw-rw- apache/apache 0 2004-03-08 13:42:29 home/virtual/site6/fst/home/webmaster/mainwebsite_html/var/plain/storage/images/club_members/woods_nick/196-4-eng-GB/woodsnick.jpg <b>link to</b> /home/virtual/site6/fst/home/webmaster/mainwebsite_html/var/plain/storage/images/club_members/nick_woods/196-2-eng-GB/nick_woods.jpg
The strange thing is that if i do 'ls -l' in the original directory the files that tar says are linked (ie home/virtual/site6/fst/home/webmaster/mainwebsite_html/var/plain/storage/images/club_members/woods_nick/196-4-eng-GB/woodsnick.jpg )they just show up as normal files (no 'l' or 'linked to') , and if I download one with smartftp (windows prog) it downloads the original file, yet tar stores them as files and winzip just ignores them
do you have any ideas what might be causing this ?
Igor Drozdov
Friday 12 March 2004 8:30:32 am
There are some utilities to make symbolic links (junctions) under Windows. I personally like excellent Junction program from http://www.sysinternals.com/ntw2k/source/misc.shtml#junction
There are other utilities to check out.
http://www.hlm.inc.ru/ is onehttp://www.rekenwonder.com/linkmagic.htm - is another.