LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-01-2006, 05:05 PM   #1
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: san antonio, texas
Distribution: Fedora 64 bit RAID0 + LUKS, CentOS (server), Backtrack, Gentoo Hardened
Posts: 1,441

Rep: Reputation: 81
bad magic numbers bzip2


Why does bzip2 say bad magic numbers? I know nothing is wrong with the tar archives, but bzip2 will not compress them. I am getting this message.

ubuntu@ubuntu:~/Desktop/b/CHRIS$ bzip2 -9tv *.tar
BACKUP.tar: bad magic number (file not created by bzip2)
USBDISK.tar: bad magic number (file not created by bzip2)

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

ubuntu@ubuntu:~/Desktop/b/CHRIS$
 
Old 08-01-2006, 05:19 PM   #2
fourchannel
LQ Newbie
 
Registered: Jul 2006
Location: Tuscaloosa, AL - USA
Distribution: Gentoo
Posts: 29

Rep: Reputation: 15
It's that pesky t you've got in the options flag.
Code:
bzip2 -9tv *.tar
the -t means verify the archive and make sure it's intact, however (and I see why you did this cause it annoys me too) you have to create the archive first and verify after.

Code:
bzip2 -9v *.tar && bzip2 -t *.tar
Edit:

I forgot bzip2 adds the extension .bz2 so the new code needs to be
Code:
bzip2 -9v *.tar && bzip2 -t *.tar.bz2

Last edited by fourchannel; 08-01-2006 at 11:51 PM. Reason: Forgot something
 
Old 08-01-2006, 06:00 PM   #3
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: san antonio, texas
Distribution: Fedora 64 bit RAID0 + LUKS, CentOS (server), Backtrack, Gentoo Hardened
Posts: 1,441

Original Poster
Rep: Reputation: 81
thank you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bad Magic Number??? Acej Linux - Newbie 4 10-07-2008 09:33 AM
Filesystem Magic numbers? where are they defined? NiallC Linux - General 3 02-07-2005 12:42 AM
Bad Magic Number joseph Linux - Software 1 01-05-2004 04:22 AM
magic numbers problem muneebs123 Programming 2 09-05-2003 02:33 PM
magic numbers muneebs123 Mandriva 1 09-04-2003 07:31 PM


All times are GMT -5. The time now is 10:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration