ICT Button with Arrow Compress and Extract Files using tar on command line Toucan Extended

More results from 2020

D4A671AF-CED1-414C-A87D-03FFC1161766 Created with sketchtool.
+ 0 %
Increase in conversion off a high base - Manufacturer
445890D3-330E-4A74-A97E-2B9CB1F68F97 Created with sketchtool.
0 %
Increase on conversion rate - B2B Service Business
65D6315C-5EC8-40CC-823A-AAE13049E07C Created with sketchtool.
+ 0 %
Increase on leads with a simple 1 page UX/UI revamp - April 2020
84612853-B9E5-4948-81FA-40E714419F7E Created with sketchtool.
+ 0
Awards & mentions across 4 different industries (+9 during COVID-19)

Let’s point you in
the right direction

Required fields

Call us curious cats...

Blog

11 Feb 18

Compress and Extract Files using tar on command line

Julian Chan | Web Development

As web developers, we deal with ‘tar.gz’ archives quite often.  Here are a few useful commands.

Creating a ‘tar.gz’ archive from a directory

  tar -zcvf archive-name.tar.gz directory-name

Extracting a ‘tar.gz’ archive

  tar -zxvf archive-name.tar.gz

Option types for tar

There are various ways to specify options when using the ‘tar’ command:

  • tar -z -x -v -f archive-name.tar.gz
  • tar -zxvf archive-name.tar.gz
  • tar zxvf archive-name.tar.gz
  • tar –extract -verbose -gzip – file archive-name.tar.gz

For further information about all the options, you can use the command line man page or online