tar: blocksize = 0 - Error message?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers tar: blocksize = 0 - Error message?
# 1  
Old 08-11-2007
tar: blocksize = 0 - Error message?

Hi All,

While viewing tar file using "tar tf file.tar" command, I have received
"tar: blocksize = 0" message and while extracting a particular file from the same tar file (file.tar) I have received the same message and nothing is extracted.

Above commands ran in a shell script so, I manually re-viewed and extracted it then it is OK.

Please let me know what would be the problem?

Thanks.
# 2  
Old 08-11-2007
I have only seen the "tar: blocksize = 0" message when the tar file being extracted is zero-length. Is it possible in the script you are specifying another file by mistake or, perhaps, the tar filename is correct but is actually zero-length at that time?

If it works manually, I suspect there is an error in the script. Try doing an "ls -l file.tar" immediately before the tar list in the script to verify its size.
# 3  
Old 08-11-2007
Try running the script with the -x option. This is more often then not caused by a typo in the filename or in a variable.
# 4  
Old 08-11-2007
Hi Hegemaro / Reborg,

As both of you said, it has been executed with -x option and file should be empty while testing by tar tf option.

Thanks a lot for your both help.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

tar command to explore multiple layers of tar and tar.gz files

Hi all, I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies

2. UNIX for Dummies Questions & Answers

tar -cvf test.tar `find . -mtime -1 -type f` only tar 1 file

Hi all, 4 files are returned when i issue 'find . -mtime -1 -type f -ls'. ./ora_475244.aud ./ora_671958.aud ./ora_934052.aud ./ora_934050.aud However, when I issued the below command: tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Discussion started by: ahSher
2 Replies

3. Solaris

Tar blockSize problem

Hi, i have got a tar file some 200MB big and i have ftp'ed the tar file over from one server to another but it does not seem to extract. its giving the following message: tar xvf saptar tar: blocksize = 2 Its the first time i used tar so I not got any ideas why its giving this message?... (2 Replies)
Discussion started by: scriptingmani
2 Replies

4. UNIX for Dummies Questions & Answers

tar: blocksize

Hi, When doing tar -xvf to untar, some tar versions display the blocksize: “tar: blocksize = 6” my goal is to avoid this message. One way of doing it is to specify the blocksize: tar -xvfb <tar_file> 6 Is there a setting in tar or a tar version to avoid this type of message without... (0 Replies)
Discussion started by: melanie_pfefer
0 Replies

5. UNIX for Advanced & Expert Users

tar: tape blocksize error

Hi, I have tar: tape blocksize error when launching # gunzip < TierDB.tar.gz |tar -xvf /data/ora/DREC tar: tape blocksize error Can you please help me ? It is urgent. Many thanks. (1 Reply)
Discussion started by: big123456
1 Replies

6. UNIX for Dummies Questions & Answers

How to change blocksize for in tar command

How can I change the blocksize in tar command? tar cvf test.tar backup.sh a backup.sh 1K If we need to set the blocksize to 20, how to do that? Please advise. Thank you. (10 Replies)
Discussion started by: KhawHL
10 Replies

7. UNIX for Dummies Questions & Answers

Blocksize problem restoring file from tape

I was recently given the responsibility of the unix box at our work. Without much training, I now have to go back and restore a file from tape. I'm having some trouble with it. I'm getting an error with the blocksize. The part of the script that does the tar looks like this: tar cvfX... (11 Replies)
Discussion started by: citrowske
11 Replies

8. UNIX for Advanced & Expert Users

Tar: tape blocksize error

When trying to extract a tar file in HP-UX using tar -xvf command it exits with the following error :"Tar: tape blocksize error". Tar file is created using the following command with MKS toolkit(Unix Simulation Kit for Windows env) under Windows 2000 Professional: "$tar -cvf test.tar test.txt... (1 Reply)
Discussion started by: ramkumar
1 Replies

9. Linux

Message with tar

Hello everbody Im trying to use tar for a file. for example test.tar and I use tar xvf test.tar and start to extract, but suddenly appear this message tar:directory checksum error What this message means? and how I can extract my tar file without problems. Thanks in advance My... (2 Replies)
Discussion started by: lo-lp-kl
2 Replies
Login or Register to Ask a Question