Gzip Files – How to Gunzip Files Recursively

filesgzip

I am learning Linux and I was trying the gzip command. I tried it on a folder which has a hierarchy like

Personal/Folder1/file1.amr
Personal/Folder2/file2.amr
Personal/Folder3/file3.amr
Personal/Folder4/file4.amr

I ran
"gzip -r Personal"
and now its like

Personal/Folder1/file1.amr.gz
Personal/Folder2/file2.amr.gz
Personal/Folder3/file3.amr.gz
Personal/Folder4/file4.amr.gz

How do I go back?

Best Answer

You can use

gunzip -r Personal

which works the same as

gzip -d -r Personal

If gzip on your system does not have the -r option (e.g. busybox's gzip) , you can use

find Personal -name "*.gz" -type f -print0 | xargs -0 gunzip
Related Question