I have a directory with thousands of files .gz and I would like to uncompress and save the uncompressed files in a specific directory.
I have tried but I can get it (beginner in this field).
Thanks
Try something like:
mkdir destination
cd destination
for g in ../origin/*.gz; do # Each *.gz file in origin...
gzcat $g > ${g##../origin/} # ... gets uncompressed to here
done
With thousands of files, the glob (../origin/*.gz
) might choke... and the destination directory might also get very slow.
.gz
file?