Home
Cloud
Big Data
CI
Install
Samples
Java
Ubuntu
Maven
Archive
Linux-Ubuntu
|
gzip/gunzip -- compression/decompression
Examples
Examples
Compressing a file:
This will compress the file "
file1
" and rename it to "
file1.gz
":
$ touch file1
$ ls -al -rw-r--r-- 1 mtitek mtitek 5632 3 Feb 21:01 file1
$ gzip file1
$ ls -al -rw-r--r-- 1 mtitek mtitek 242 3 Feb 21:01 file1.gz
Decompressing a file:
This will decompress the file "
file1.gz
" and rename it to "
file1
":
$ gzip -d file1.gz
$ ls -al -rw-r--r-- 1 mtitek mtitek 5632 3 Feb 21:01 file1
Decompressing a file (
gunzip
):
You can use
gunzip
to decompress the file "
file1.gz
" and rename it to "
file1
":
$ gunzip file1.gz
$ ls -al -rw-r--r-- 1 mtitek mtitek 5632 3 Feb 21:01 file1
© 2010-2022
mti
tek