Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

How to compress and decompress a file in the terminal

gzip <filename>

# command to compress a file while keeping the original file
gzip -c <filename> > <filename.gz>
# OR
gzip -k <filename>

# command to uncompress a file
gunzip <filename.gz>
# OR
gzip -d <filename.gz>
# OR
zcat <filename.gz>

# -f is used to force compress or decompress
gzip -cf <filename>

# -q supresses all warnings

# -r recursively compresses all the files within a specified directory
gzip -r Documents

# flags to alter the speed and rate of compression
--fast or -1 speeds up the process and results to a lesser compression
--best or -9 is the slowest and give the best compression
-6 is the default

# check out man gzip for more details o compressing several files at once.
Comment

PREVIOUS NEXT
Code Example
Shell :: command to display topmost cpu intensive running processes 
Shell :: command to ceck number of lines or words in a file 
Shell :: download ubuntu 20 from gdrive 
Shell :: fstab path 
Shell :: truenas community unable to Download Plugins 
Shell :: powershell open excel file 
Shell :: separate a line using sed 
Shell :: nc + bash 
Shell :: install postgresql and phppgadmin client 
Shell :: shopify buy sdk 
Shell :: how to install threejs debugger 
Shell :: npm ldapjs 
Shell :: install arch.univariate import arch_model 
Shell :: run zip command in powershell 
Shell :: fish function to change php version devilbox 
Shell :: git annoted tags 
Shell :: shell How to read hidden input from terminal and pipe it to another command 
Shell :: restore gpg key 
Shell :: killall kdevtmpfsi 
Shell :: install bpytop arch linux 
Shell :: Remove any previous Go installation 
Shell :: eb setenv 
Shell :: start adb exe manually if necessary 
Shell :: date last friedy in linux 
Shell :: pnpx no-interactive 
Shell :: grep belirli bir dosyada arama yapmak 
Shell :: how quit in after git show command 
Shell :: setting the CLASSPATH to temp libs in linux 
Shell :: fat-free benchmark plugin 
Shell :: telnet test port udp 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =