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 jonee on 20-Aug-2019 11:39 am
Type your comment...If you’re setting up a new business, often every cent counts. The advantage of an online business is that you don’t need to invest so much money to get started. Even if you don’t have the financial backing that you need, your business can start paying for itself and fund future expansion. Alternatively, there are online short term loans for bad credit. Click here to find out more information. $ tar -cvf
  • Reply
  •  6 Like
  •  6 Dislike
  • Report
  by edward on 27-Jul-2019 09:11 pm
This website is designed to be an example site for some of my clients. Expanding business
  • Reply
  •  6 Like
  •  6 Dislike
  • Report
  by Shaan on 21-Jul-2019 11:36 pm
Type your comment...What an extensive article, Very informative and helpful post. I love all your blogs 
  • Reply
  •  6 Like
  •  6 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
  •  6 Like
  •  6 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
  •  6 Like
  •  6 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
  •  6 Like
  •  6 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
  •  6 Like
  •  6 Dislike
  • Report
  by isabell on 02-Aug-2019 11:52 am
If you are unable to withdraw your money from Zelle then you can call our toll-free number 1(855)-504-2278 or visit our Zelle Support Number
  • Reply
  •  7 Like
  •  6 Dislike
  • Report