bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] Regarding untaring tar files containing symlinks


From: Linda A. Walsh
Subject: Re: [Bug-tar] Regarding untaring tar files containing symlinks
Date: Fri, 04 Jul 2014 07:21:21 -0700
User-agent: Thunderbird

Amit Kapila wrote:
On Thu, Jul 3, 2014 at 9:58 AM, Linda A. Walsh <address@hidden <mailto:address@hidden>> wrote:
>
>
> Best bet might be to use cygwin to untar your files... it can create win-symlinks.

Do you know the specific utility in cygwin package which
I can use?

I had tried with bsdtar.exe available after installing cygwin,
it also doesn't extract symlinks from tar.

With Regards,
Amit Kapila.

tar-1.27.1
I created the file on linux using tar-1.26-19.1.2.x86_64, which is from:

URL         : http://www.gnu.org/software/tar/
Summary     : GNU implementation of tar ((t)ape (ar)chiver)

and...
/h> cp symtest.tar /tmp
/h> cd /tmp
/tmp> tar xaf symtest.tar
/tmp> cd symtest
/tmp/symtest> ls
one/  symone@  symthree@  symtwo@  three/  two/
/tmp/symtest> cd two
/tmp/symtest/two> ls
1@  2@  3@
/tmp/symtest/two> cat 1
file one
/tmp/symtest/two> cygcheck -f /bin/tar
tar-1.27.1-1
/tmp/symtest/two> cmd
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\tmp\symtest\two>dir
Volume in drive C is System Disk
Volume Serial Number is E889-68E4

Directory of C:\tmp\symtest\two

07/04/2014  07:02 AM    <DIR>          .
07/04/2014  07:02 AM    <DIR>          ..
07/04/2014  07:02 AM    <SYMLINK>      1 [..\one\1]
07/04/2014  07:02 AM    <SYMLINK>      2 [..\one\2]
07/04/2014  07:02 AM    <SYMLINK>      3 [..\one\3]
              3 File(s)              0 bytes
              2 Dir(s)  303,017,234,432 bytes free

C:\tmp\symtest\two>type 1
file one
C:\tmp\symtest\two>dir ..
Volume in drive C is System Disk
Volume Serial Number is E889-68E4

Directory of C:\tmp\symtest

07/04/2014  07:00 AM    <DIR>          .
07/04/2014  07:00 AM    <DIR>          ..
07/04/2014  07:01 AM    <DIR>          one
07/04/2014  07:00 AM    <SYMLINKD>     symone [one]
07/04/2014  07:00 AM    <SYMLINKD>     symthree [three]
07/04/2014  07:00 AM    <SYMLINKD>     symtwo [two]
07/04/2014  07:00 AM    <DIR>          three
07/04/2014  07:02 AM    <DIR>          two
              0 File(s)              0 bytes
              8 Dir(s)  303,017,140,224 bytes free
=================

It looks to me like win7 (and I believe vista) work fine with symlinks...

ON WINDOWS --

Caveats:

my "CYGWIN" env var is set to:
 echo $CYGWIN
system nodosfilewarning winsymlinks:native export
---

2) creating symlinks must be permitted in windows:
 fsutil behavior query symlinkevaluation
Local to local symbolic links are enabled.
Local to remote symbolic links are enabled.
Remote to local symbolic links are enabled.
Remote to remote symbolic links are enabled.

(use set to enable)

3) the symlinks must reside on an NTFS file system.

4)?? It may require some admin priv I don't know about,
as I'm in the admin group on my Winbox.

------------

Note -- the target of a symlink can be anywhere:

I.e. in my win-homedir, my Documents directory points to my server:
law.Bliss> ll Doc*
lrwxrwxrwx  1 17 Nov  2  2013 Documents -> //Bliss/Documents/

(Bliss is my domain name... I thought it perfect [irony] for a win domain name)











reply via email to

[Prev in Thread] Current Thread [Next in Thread]