How to Tar / Untar From the Command Line
A simple guide for those who are as helpless on the Linux command line as I am. When managing websites, you’ll often need to compact, move and extract a large number of files, here’s how to do it on your Linux box.
Initial Steps
First SSH into your web server and move to the directory of the files you wish to tar up, since tarring an absolute path will save the folder structure as well which is bad (ie: /home/yoursite/public_html/backupthis/ will save the folders home -> yoursite -> public_html -> backupthis). You can get to the folder you need to by typing:
Creating a Tar
Now that we’re at the directory we want to tar, or the sub-directory, you can do one of two commands depending on what you need.
If you want to save every file / folder in your current location into a file called backup.tar.
If you want to save a tar named backup.tar with the folder “somefolder” and its contents.
You can test/view your tars with the following command:
Extracting the Tar
When you need to extract that tar, the following command will be suffice:

Thank you, I forgot on letter and was looking everywhere for this
Comment by Tim — February 10, 2008 @ 2:13 pm
Nice and simple…. thanks….
Comment by rana — July 25, 2008 @ 9:52 am
I extracted the file without the command line I extracted it with the archive manager I extracted it to my desktop but how can I install it I don’t have a CD remember ndiswrapper is in my desktop so tell me how to install it where should I go & I’m using ubuntu hardy & I don’t have internet connection I want ndiswrapper to let me install my usb driver wireless adapter. I hope u send me a message to help me in this sitruation. plus the ndiswrapper.deb required module-assistant almost all apps require dependencies.
Comment by narutowire — September 3, 2008 @ 9:01 am
thx
Comment by itracMEDIA realestate — April 6, 2009 @ 3:58 pm