![]() |
anyone knows how to zip a directory?
I want to zip a directory on my server...anyone knows how to do it?
Thanks! |
If the directory you want to tar is 'content'
cd content tar cvf /tmp/content.tar If that doesn't work, I dunno. I think that will preserve the directory structure, right? |
Quote:
But thanks anyway :thumbsup :helpme |
go inside the directory 'tar * filename.tar' thats just a guess though i havent used unix in years
|
Fuck! Sorry, bro! Fukkin linux unix shit....
Here is a toot I found in google: Back up the contents of the etc directory in an archive called etc.tar . Make sure that the archive is created in your own home directory. cd / tar -cvf ~/etc.tar etc Explanation: Change to the parent of the /etc directory. Create a backup of etc in the file ~/etc.tar Does that work? |
nopoe...nothing worked so far :(
|
I suck ass, sorry I couldn't help.
*bump* |
Well why don't you first let us know what OS you are using...
|
Try this
tar czvf yourdirectory.tar.gz /path_to_your_directory/directory That has to work.... |
I have linux (I think redhat).
|
Quote:
|
And when you want to extract it
gunzip filename.tar.gz tar -xf filename.tar |
Actually, it's much easier to extract a file with .tar.gz extension with this command:
tar zxvf filename.tar.gz |
you can do:
tar -cpvf TAR_FILE_NAME.tar DIR Where TAR_FILE_NAME is the name of the tar file to be created and DIR is the name of the DIR to be tarred. Be sure to be in the DIR aboive the dir to be tarred. The -c means create, the p mean preserve permissions, the v mean verbose (so you can see what is being tarred), and the f mean create the specified file. A real worl example would be: If you are in /usr/home/mydir and there is a site directory called site, you could tar the whole thing with: tar -cpvf site.tar site That would create the file site.tar that would include everyting in the DIR /usr/home/mydir/site Make sense? |
| All times are GMT -7. The time now is 05:47 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123