So I have
.lzo files in
/test01/primary folder which I need to uncompress and then delete all the
.lzo files. Same thing I need to do in
/test02/secondary folder as well. I will have around 150
.lzo files in both folders so total around 300 files.
From a command line I was running like this to uncomressed one file
lzop -d file_name.lzo
What is the fastest way to uncompressed all
.lzo files and then delete all
.lzo files from both folders. I came up with below code.
#!/bin/bash set -e export PRIMARY=/test01/primary export SECONDARY=/test02/secondary lzop -d $PRIMARY/* & lzop -d $SECONDARY/* find $PRIMARY $SECONDARY -name '*.lzo' -delete
May be we can decompress the
.lzo files in parallel and then delete all
.lzo file in both the folders simultaneously to speed up the process.
Is there a better way?