Ssh – How to recursively uncompress gz files on a remote host with limited commands

gzipremotessh

I have a bunch of .jpg.gz files in a directory that I need to decompress.

I know that the decompress command is:

tar -xzvf FileNameHere.jpg.gz

But is there a flag that you can recursively uncompressed the files in a directory? I have over a hundred compressed files and I don't want to manually decompress every single one.

Also since I am SSHing into an hosting service I only have the following commands to use:

arch
bzip2
cal
cksum
cmp
cp
crontab
basename
cd
chmod
ls
date
df
du
dos2unix
unix2dos
file
getfacl
gzip
head
hostid
tail
mkdir
mv
nslookup
sdiff
tar
uptime
wget
whois
unzip

Best Answer

To extract your files, you need to use gzip:

gzip -d *.jpg.gz

You mention doing this recursively; given that you don't have find, you'll have to visit each directory in turn and run the above command.

Related Question