XMPP JavaScript Library

Working with tar in Linux

Linux, Sachin Puri, 2011-08-20 16:54:37

Create a tar file (compress a folder using tar in Linux)

$ tar -cvf <tar-file-name.tar.gz> <full-path-to-folder>

Create a tar file using gzip compression (compress a folder using tar in Linux)

$ tar -zcvf <tar-file-name.tar.gz> <full-path-to-folder>

Example :-

$ tar -zcvf myfoldertar.gz /home/user1/myfolder

List contents of a tar File

$ tar -tvf <filename.tar>

List contents of a tar.gz File

$ tar -ztvf <filename.tar.gz>

List contents of a tar.bz2 File

$ tar -jtvf <filename.tar.bz2>

Extract specific files from tar

$ tar -xvf <tar-file-name>

Extract specific files from tar

$ tar -xvf <tar-file-name> <path-to-file-or-folder>

c :: List the contents

t :: List the contents

v :: Verbose

f :: Filename

z :: Filter archive using gzip

j :: Filter arvhive using bz2

Add Your Comment
   
    Yes! I want to receive all comments by email

  by edward on 17-Jul-2019 04:02 am
Nice to be visiting your blog once more. instagram likes buy
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by edward on 17-Jul-2019 02:46 am
I absolutely love your blog and get a lot of help. INTERNATIONAL SHIPPING SYDNEY
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by seospcl on 16-Jul-2019 03:17 pm
I absolutely love your blog and get a lot of help. Online Printing India
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by Shaan on 16-Jul-2019 02:00 am
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by Spa in Delhi on 16-Jul-2019 01:58 am
Type your comment...http://www.massageindelhi.in/ http://www.amritamassagecentre.in/ http://www.amritabodymassage.in/ http://www.massagecentreindelhi.in/ http://www.thelotusspa.in/ http://www.bodytobodymassage.in/ http://www.bestbodymassageindelhi.com/
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by edward on 15-Jul-2019 10:48 pm
Family owned & operated hauling service based in Okeechobee Florida. Reliable & Honest. We haul loads that larger trucking companies just don't want to deal with. Licensed & Insured. Sod Delivery Installation Service
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by edward on 14-Jul-2019 02:46 am
Nice to be visiting your blog once more. facebook customer service number
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by QuickBooks Desktop payroll Support Number on 13-Jun-2019 05:20 pm
Quickbooks Desktop Payroll Support Number 1855-548-3394 is assisted by a talented team that provides 24*7 support for QuickBooks Desktop Payroll round the clock.
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by Sage fixed Assets Support on 27-May-2019 03:27 pm
Sage Fixed Assets Support | 1855-548-3394 Sage Support a superb software that can help in finishing accounting assignments rapidly and proficiently in an a lot lesser time.
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by wedding photography on 20-May-2019 11:10 pm
Type your comment...Yes i am totally agreed with this article and i just want say that this article is very nice and very informative article.I will make sure to be reading your blog more. You made a good point but I can't help but wonder, what about the other side? !!!!!!Thanks
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by Samsung S10 on 02-Mar-2019 02:02 pm
Absolutely unique and excellent content that you have shared above. It was very useful for me. Thanks a lot.
  • Reply
  •  0 Like
  •  0 Dislike
  • Report