Convert many files to individual .bz2 files retaining original name?
Hello everyone, i have a large directory of .bsp files that i would like to convert .bz2 archives. I've been searching for some time and all i can find is the obvious compress multiple files into one large archive. If anyone knows how to convert each file individually, while retaining the original file name (testmap.bsp would be archived as testmap.bsp.bz2) Any help is greatly appreciated!
|
In the appropriate directory:
Code:
for filname in *.bsp; do |
What's wrong with:
$ bzip2 large_directory/* ? |
Wow, thank you for the quick response! That was far simpler than i expected, thanks for making me feel stupid haha :)
|
Quote:
|
This seems to do the trick without any errors:
Code:
for filname in *.bsp; do Code:
find . -name "*.bsp" | xargs bzip2 -k |
All times are GMT -5. The time now is 07:24 PM. |