Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Hard link issue

by oiskuu (Hermit)
on Jul 13, 2016 at 18:12 UTC ( [id://1167722]=note: print w/replies, xml ) Need Help??


in reply to Hard link issue

Try listing the tar archive with the hardlink. For example:

$ tar -tvf test.tar
drwxr-xr-x 0/0       0 2016-07-13 00:00 t/
drwxr-xr-x 0/0       0 2016-07-13 00:00 t/foo/
-rw-r--r-- 0/0       7 2016-07-13 00:00 t/foo/A
drwxr-xr-x 0/0       0 2016-07-13 00:00 t/bar/
hrw-r--r-- 0/0       0 2016-07-13 00:00 t/bar/B link to t/foo/A

The equivalent of ln t/foo/A t/bar/B is performed when extracting such an archive. However, you have chosen to flatten the directory structure and extract all files in one target directory. In this case, linking will fail because the source file cannot be found in its expected location. (The t/foo/A is now outdir/A instead.)

I would suggest performing the operation in two stages: first to extract the files as usual, then flattening the directory.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1167722]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-03-29 11:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found