DAY 15 - FILE COMPRESSION


q  File Compression:

 

v  gzip-Compress

 

Ü  gzip file1 >> file1.gz >> zcat file1.gz [without decompressing the file we can read content]

Ü  gzip -k file1 [keep the original file]

Ü  gzip -r dir1 [zip all the under the directory]

Ü  file file1.gz [Can check what type of file]

 

v  gzip-DeCompress

 

Ü  gzip -d file1.gz

Ü  gunzip file1.gz

 

v  bzip2-Compress

 

Ü  bzip2 file1 >> file1.bz2 >> bzcat file1.bz2 [without decompressing the file we can read content]

 

v  bzip2-DeCompress

 

Ü  bzip2 -d file1.bz2

Ü  bunzip2 file1.bz2

 

v  xz-Compress

 

Ü  xz file1 >> file1.xz >> xzcat file1.xz

 

v  xz-DeCompress

 

Ü  unxz file1.xz

Ü  xz -d file1.xz

Ü  tar -cJvf file.tar.xz

 

v  Tar [Tape of archive]

 

Ü  tar -cvf home.tar /home [c means create]

Ü  tar -tvf home.tar [Check inside the file without untar]

Ü  tar -xvf home.tar [ x means extract]

Ü  tar -xvf home.tar -C /restore [untar specific location]

Ü  tar -xzvf home.tar.gz [z means gz]

Ü  tar -xjvf home.tar.bz2 [j means bz2]

 

v  time tar -xvf home.tar [check real time]

 

 

Previous Post Next Post

نموذج الاتصال