find . -name "*.gz" | while read filename; do gzip -cdv $filename > ../decompressed/$filename; done;
The above statement uses 'find' command to get list of .gz files in the current (.) directory. Then it pipes it to while loop which executes gzip -cdv for each file and redirect the output to ./decompressed/ directory.
No comments:
Post a Comment