Go Back   Linux Forums by TotalPenguin! Get linux Help! > Linux > Linux General

Linux General Any questions that are not covered by other forums go here.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-18-2007, 11:12 PM
Member
 
Join Date: Jan 2007
Posts: 96
Prog is on a distinguished road
Default tar entire directory

How do I tar an entire directory?
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 06-19-2007, 11:55 PM
Jordan's Avatar
Administrator
 
Join Date: Nov 2006
Posts: 570
Jordan is on a distinguished road
Default

Here is the command:

tar -cvf mytarfile.tar mydir/
Reply With Quote
  #3 (permalink)  
Old 06-20-2007, 12:12 AM
Member
 
Join Date: Jan 2007
Posts: 96
Prog is on a distinguished road
Default Create a tar of entire directory and subdirectories

Ok, I've got that - now how do I add gzip compression to the tar so I don't have to manually do a gzip command?
Reply With Quote
  #4 (permalink)  
Old 07-20-2007, 06:37 PM
Jordan's Avatar
Administrator
 
Join Date: Nov 2006
Posts: 570
Jordan is on a distinguished road
Default

Just add a z to the list:

tar -zcvf mytarfile.tar.gz mydir/

and to untar:
tar -zxvf mytarfile.tar.gz
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Directory index forbidden by rule Wanch Linux Networking 1 06-22-2007 11:23 PM
Howto: Find the largest directory/file in a directory ptt3 Linux General 4 05-28-2007 10:08 PM
Move an entire directory C3P0 Linux General 1 03-22-2007 05:55 PM


All times are GMT. The time now is 05:15 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.