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
tar
is used to create or unpack archives. An archive is a collection of several files, and may also contain a directory-structure. Often archives are compressed - usually withgzip
(.tar.gz),bzip2
(.tar.bz2) orxz
(.tar.xz) - but the compression/uncompression is done with separate programs...tar
however, can call these programs seamlessly (when given the z, j, or J option). Your files are not tar-archives, butgzip
ed files - to uncompress, simply usegunzip
(orgzip -d
. JPG is a compressed format, so it's usually redundant to compress it again.