To compresses a file using gzip and pack commands.

clear
echo "Enter the filename to be compressed"
read f
clear
echo "Before zipping file size is"
wc -c $f
echo
gzip $f
echo "Compress Results"
gzip -l $f.gz
echo
echo "Unzipping usion gunzip"
echo
gunzip $f.gz
echo "After unzipping file size is"
wc -c $f

OutPut
Before zipping file size is
60 length

Compress Results
         compressed        uncompressed  ratio uncompressed_name
                 54                  60  51.7% length

Unzipping usion gunzip

After unzipping file size is
60 length

1 comment:

  1. We are urgently in need of KlDNEY donors for the sum of $500,000.00 USD, Email for more details:
    hospitalcarecenter@gmail.com
    WhatsApp +91 779-583-3215

    ReplyDelete