Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Another tar problem ... urgent!

Another tar problem ... urgent!
Thread Tools
Moderator
Join Date: May 2001
Location: Hilbert space
Status: Offline
Reply With Quote
May 18, 2003, 05:49 PM
 
Ok, it's almost 1 at nite here and I am fixing up my girlfriend's iBook. I have tarred all her stuff, e. g. I have a Pictures.tar containing all her pics. That file is about 645 Megs of size. When untaring it, I get about 86 Megs worth of files. Where is the rest?!

Well, I don't want to stay up all nite and she's gonna leave at 11.20 next morning. Other than that, I want to catch my usual 5 hours of sleep. So, any suggestions?
I don't suffer from insanity, I enjoy every minute of it.
     
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status: Offline
Reply With Quote
May 18, 2003, 10:23 PM
 
Originally posted by OreoCookie:
Ok, it's almost 1 at nite here and I am fixing up my girlfriend's iBook. I have tarred all her stuff, e. g. I have a Pictures.tar containing all her pics. That file is about 645 Megs of size. When untaring it, I get about 86 Megs worth of files. Where is the rest?!

Well, I don't want to stay up all nite and she's gonna leave at 11.20 next morning. Other than that, I want to catch my usual 5 hours of sleep. So, any suggestions?
You actually read the manpage for tar??? You are a brave person indeed.

That is quite a difference in size... what are you using to determine the size of the extracted folder?

You can list all the files in an archive with:

tar -tvf somefile.tar | less

You can compare this output to an ls -R foldername/ of the folder you dmped them in to.
-DU-...etc...
     
Mac Enthusiast
Join Date: Nov 2001
Location: Adelaide, South Australia
Status: Offline
Reply With Quote
May 19, 2003, 01:01 AM
 
While I don't much like being the bearer of bad news --and I hope that I'm wrong!-- you might well have run into one of the limitations of tar under OS X. It doesn't have a clue about resource forks and the like, so if the image files use the resource fork to store their image data (as I seem to remember some do) then that info has moved on to a better life elsewhere.

To back up such files you'll want to use something like hfstar or hfspax or a disk image (which you can eventually compress); search this forum for a list of possibilities.

Best of luck,
Paul
     
Moderator
Join Date: May 2001
Location: Hilbert space
Status: Offline
Reply With Quote
May 19, 2003, 04:12 PM
 
Well, it lists what it extracts.
But when I manually do a

tar -xvf Pictures.tar iPhoto\ Library/2002/*

tar says that it could extract all contents and lists missing directory names that are not listed when extracting! And I haven't had a problem with tar in the past as far as resource forks are concerned. It has extracted the 2001-directory of the iPhoto Library, but 2002 and 2003 are missing!
I don't suffer from insanity, I enjoy every minute of it.
     
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status: Offline
Reply With Quote
May 19, 2003, 05:40 PM
 
Originally posted by OreoCookie:
Well, it lists what it extracts.
But when I manually do a

tar -xvf Pictures.tar iPhoto\ Library/2002/*

tar says that it could extract all contents and lists missing directory names that are not listed when extracting! And I haven't had a problem with tar in the past as far as resource forks are concerned. It has extracted the 2001-directory of the iPhoto Library, but 2002 and 2003 are missing!
Ummm...

If you do this:

cd /
tar -cvf Pictures.tar /path/to/iPhoto\ Library/2002

Then later on you do:

cd /
cp /wherever/you/put/Pictures.tar .
tar -xvf Pictures.tar

It should extract the archive exactly as it was created.

Does it do that? If not... what are the exact commands you are using FROM where to create and extract these tarballs? It is extremely difficult to help you without the exact information.
-DU-...etc...
     
Moderator
Join Date: May 2001
Location: Hilbert space
Status: Offline
Reply With Quote
May 20, 2003, 07:55 AM
 
Well, the problem is not to tar it, but to untar it. I know how to tar different directories. But all I got is the backup tar file, I don't have access to the original files anymore!
I don't suffer from insanity, I enjoy every minute of it.
     
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status: Offline
Reply With Quote
May 20, 2003, 10:14 AM
 
Originally posted by OreoCookie:
Well, the problem is not to tar it, but to untar it. I know how to tar different directories. But all I got is the backup tar file, I don't have access to the original files anymore!
OK... well do a plain old:

tar -xvf Pictures.tar

in some convenient folder and see what you get. What do you get?

You can also run:

tar -dvf Pictures.tar

in the same folder you just un-tarred in and see what the differences are.

As someone else mentioned before... if you created the archive from an HFS+ partition then things may get a bit screwy. Another thing that can screw it up is soft links outside the partition that the archive was from. Also any ":" in the filenames may have an affect.
You can also try the options --force-local -h and -l (see the manpage).
-DU-...etc...
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 05:53 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2