Wallpapers Forums Login

How To Tar A Directory In Linux With A Shell Command

tar -pczf www-2008-oct-13.tar.gz www/



lets say i want to compress the /var/www directory this is what i would do, i would cd to the /var directory:

cd /var


then i can compress the www/ direcotry and im going to call it backup.tar.gz

tar -pczf backup.tar.gz www/


how how do i untar it? once i have tar it, i can untar it with this command:

tar xvfz backup.tar.gz


hope this helps

ashwin2011 Mon May 21, 2012
wow if i had to back this directory lolz..
nice command..
Typonazi Thu Feb 02, 2012
"then i can compress the www/ direcotry and im going to call it backup.tar.gz "

directory

Feel free to delete this message after correction.
wally Sat Nov 12, 2011
Very usefull commands!!!!
Thanks a lot man!!!
Warsi Sun Oct 16, 2011
Excellent work. I was looking for this command. Its really helpful. cheers.
someone Tue Aug 23, 2011
Tamo: you din't die with that flake huh ? LoL
doodle Fri Mar 25, 2011
cheers moite
Dj400 Sun Feb 06, 2011
Coool! I love you ;) ♥
Rajgopal Tue Aug 17, 2010
I have forgotten "p" I got it Thanks.
I suggest all the users to add "v" so that it will display what it is doing.
Example: tar -pczvf example.tar.gz /example
asaminew Mon Jul 05, 2010
thanks a lot
very helpful command

byyyyyyyyyyyyyyy
sonali Sun Apr 11, 2010
Thanks a lot
byeeeeeeeeeeeeeeeeeeeeeee
crispee Fri Mar 19, 2010
LOL - at - Tamo's comment, nearly fell off my chair.
Navina Thu Jan 07, 2010
superb!!!!!!!
Ankur Sat Aug 01, 2009
the above commands proved to be very helpful

Related Content

Information

Share

wallpaperama | Wallpapers | Forums | Terms Of Service

copyright © 2013 wallpaperama - All Rights Reserved - Last Updated Mon May 06, 2013 (-8 GMT)
Powered by: Webune Forums V5