top of page
uni datacenter

CLI: Useful commands for compression/extraction in Linux


For beginners, learning the Command Line Interface could be a vital tool in your arsenal. Master CLI commands to easily navigate between High-Performance Computing (HPC) clusters and your personnel computer.


Here are some of the most helpful CLI commands for compression and extraction of files in Linux -

tar cf file.tar file

Create tar named file.tar containing file

tar xf file.tar

Extract the files from file.tar

tar czf file.tar.gz files

Create a tar with Gzip compression

tar xzf file.tar.gz

Extract a tar using Gzip

tar cjf file.tar.bz2

Create tar with Bzip2 compression

tar xjf file.tar.bz2

Extract a tar using Bzip2 compression

gzip file

Compresses file and renames it to file.gz

gzip -d file.gz

Decompresses file.gz back to file

If you have any queries or problems logging into your computing space, don't hesitate to contact Uni Datacenter admin at cluster-admin@uni-datacenter.com.


 
 
bottom of page