| Now hold on a sec. I think the solution to this depends on understanding what bzip does, and what you want.
bzip is a utility that takes a single file and compresses it. I think you can do some weird things that allow it to handle multiple files, but this is not intelligent.
Instead, if you want a single bzip archive to contain multiple files (or, say, a directory), you first create a tarball of the relevant files. A tarball is basically a box containing a bunch of different files. This is why you rarely see a straight .bz file: instead, you tend to see .tar.bz.
If you are wanting individual bzip archives of every file under a subtree, then iterating through each one is what you want (though I don't see why you would do this). If you want to compress an entire directory (including subdirectories), then make a tarball of the directory and then bzip that.
Make sense?
__________________
DISTRO=Gentoo
Registered Linux User #388732
Gentoo Linux, 410 GB HD, 1.2 GB RAM, Fluxbox, These are a Few of my Favorite Things
|