PDA

View Full Version : unziping bzip2 tar files ,kbackup



ariskk
24th November 2007, 11:51 PM
Hi,

I made a backup using KBackup a couple of days ago and now I want to restore it. The backup file is a big .tar file but all the contents of the tar are bziped files, i.e.

a.bz2
b.bz2
c/d.bz2

etc.

How can I recursivelly bunzip2'them?

Thanks, Kostas

abensonox
24th November 2007, 11:59 PM
find . -name "*.bz2" | xargs bunzip2


should do the job.

ariskk
25th November 2007, 12:13 AM
excellent, thanks!

with a bit of tweak, all files were correctly decompressed!
find . -name "*.bz2" -print0 | xargs -0 bunzip2 -f