The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Question regarding lm file mr_deb UNIX for Dummies Questions & Answers 5 05-22-2008 07:22 AM
mk file question felixmat1 Shell Programming and Scripting 2 10-11-2007 10:51 PM
Post Shell programming: Question about source a file and read data from the file ccwq Shell Programming and Scripting 3 08-04-2007 10:28 PM
file question google Shell Programming and Scripting 7 08-22-2002 01:19 PM
Newbie question about difference between executable file and ordinary file Balaji UNIX for Dummies Questions & Answers 1 11-29-2000 06:49 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-17-2008
chaoses chaoses is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 4
tar file question

Hi

I did this command to tar the files but I got an error.
tar -cvpf filename.tar pathname/

It did tar the file filename.tar but then it gave me this error "Reach end of file before expected". The new tar file is about 2GB. So does that mean my tar file limit is 2GB? Is there a max limit for the number of files in the directory to tar?

How do I get around this? Do I just zip the files and then tar, after that untar and unzip?

many thanks!
  #2 (permalink)  
Old 07-17-2008
incredible incredible is offline Forum Advisor  
Registered User
  
 

Join Date: May 2008
Location: s'pore
Posts: 2,063
you can't tar files > 2 GB in size and tar has a size limit of 2 GB
1. free up /tmp if its full. verify with df
2. change file limit to unlimted and relogin
3. An error occurred during reading/writing.
4. The maximum filesize for the output file in the target filesystem -
in case the target for tar is a file - has been reached. The maximum
fs for standard JFS is 2GB

Some hints
In case of reading:
do a
$ tar -tvf MyDevice
to verify that you can read all data

In case of writing try to write to /dev/null to verfiy that the
problem is related to the target device
$ tar -cvf - /myDir >/dev/null

Alternatively, just do a zip followed by compress
your output will be filename.zip.Z
uncompress and unzip .... try if it works...?
  #3 (permalink)  
Old 07-17-2008
chaoses chaoses is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 4
I compressed the files using:
gzip *
and then tar the file
tar -cvpf myTarFile.tgz *

But when I untar it gave me this error

tar -xvvzf myTarFile.tgz
tar: Not a recognized flag: z
Usage: tar -{c|r|t|u|x} [-BdFhilmopsvw]
[-Number] [-fFile]
[-bBlocks] [-S [Feet] [Feet @Density] [Blocksb]]
[-LInputList] [-NBlocks] [-C Directory] File ...

The system doesn't support untar?
  #4 (permalink)  
Old 07-17-2008
jhtrice's Avatar
jhtrice jhtrice is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 69
You don't need the z flag. The files inside the tar are compressed not the tar.
Some versions of tar do support >2GB but it is non-standard extension.
  #5 (permalink)  
Old 07-17-2008
chaoses chaoses is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 4
okay so compress and then tar work, but it still > 2GB
Can I do 2 different tar files? if so how do I know which one is already in the first tar file when tar the second file?

Is there a way to see the list of files in the directory and tell it to tar the first 100 files to filename1.tar and then the next 200 files to filename2.tar ... and so on?

thanks
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting 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




All times are GMT -4. The time now is 08:43 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0