Skip to main content

compress a folder and decompress it in linux terminal using tar command

Compress a folder and decompress it in linux terminal using tar command 



Run "tar -czvf (archive name).tar.gz (pathtofile)” in the Terminal to compress a file or folder. 


tar -czvf (archive name).tar.gz (pathtofile)



To extract an archive to the current folder, run the command “tar -xzvf (archive file)".


tar -xzvf (archive file)

Comments