yikes, after extracting a tar backup i made in debian command shell, all files still have .gz extension

3 posts / 0 new
Last post
#1 Fri, 10/05/2018 - 06:30
adamjedgar

yikes, after extracting a tar backup i made in debian command shell, all files still have .gz extension

I have just uploaded a backup i made using debian command shell.

Only the directory names have been correctly extracted back to the proper extensions...all of the files have got ".gz" on the end of them.

How do i fix this in virtualmin? Asseen below, directories are fine however, there's hundreds of files with the .gz extension on them)

/pomo
/random_compat
/rest-api
/theme-compat
/widgets
admin-bar.php.gz
atomlib.php.gz
author-template.php.gz
bookmark-template.php.gz

no matter what i do, i cannot get any program to recursive decompress files (only folders).

I have tried virtualmin file manager, linux commands, nothing seems to work!

Fri, 10/05/2018 - 07:44
adamjedgar

i havea part solution thanks to howtoforge...

for f in wordpress/*.gz ; do gunzip $f ; done

however, i still have to figure out how to make the above command work recursively using -exec

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Fri, 10/05/2018 - 16:59
adamjedgar

Here is the final solution(thanks to an online friend)

find wordpress/ -name "*.gz" -exec ls -lh {} \;

Test it first with the above command, ls -lh does not break anything but you see what files it would mess. If the files are the correct ones, change ls -lh to gunzip.

So it's

find wordpress/ -name ".gz" -exec gunzip {}\;


Where wordpress/ is the first level directory which contained uncompressed files in my case. Hope this helps others

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Topic locked