How can I translate symbolic links from Unix onto Windows ?

Author Message

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.

Nick Woods

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 file
tar 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 trouble
grep 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 one
http://www.rekenwonder.com/linkmagic.htm - is another.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:13:16
Script start
Timing: Jan 18 2025 19:13:16
Module start 'layout'
Timing: Jan 18 2025 19:13:16
Module start 'content'
Timing: Jan 18 2025 19:13:17
Module end 'content'
Timing: Jan 18 2025 19:13:17
Script end

Main resources:

Total runtime0.7120 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 588.3672152.6563
Module start 'layout' 0.00490.0030 741.023439.4922
Module start 'content' 0.00790.7026 780.5156557.6563
Module end 'content' 0.71050.0015 1,338.171912.0938
Script end 0.7120  1,350.2656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.6079160.0003
Check MTime0.00160.2308160.0001
Mysql Total
Database connection0.00070.098010.0007
Mysqli_queries0.654991.9790620.0106
Looping result0.00090.1229600.0000
Template Total0.678595.320.3392
Template load0.00250.348620.0012
Template processing0.676094.936620.3380
Template load and register function0.00080.112910.0008
states
state_id_array0.00140.199110.0014
state_identifier_array0.00130.180920.0006
Override
Cache load0.00210.3016270.0001
Sytem overhead
Fetch class attribute can translate value0.00170.232930.0006
Fetch class attribute name0.00100.141550.0002
XML
Image XML parsing0.00090.122230.0003
class_abstraction
Instantiating content class attribute0.00000.001250.0000
General
dbfile0.00090.1277160.0001
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs