GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   anyone knows how to zip a directory? (https://gfy.com/showthread.php?t=105931)

snowball179 02-07-2003 09:12 PM

anyone knows how to zip a directory?
 
I want to zip a directory on my server...anyone knows how to do it?

Thanks!

p00p 02-07-2003 09:18 PM

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?

snowball179 02-07-2003 09:26 PM

Quote:

Originally posted by p00p
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?

doesn't work.

But thanks anyway :thumbsup

:helpme

beemk 02-07-2003 09:32 PM

go inside the directory 'tar * filename.tar' thats just a guess though i havent used unix in years

p00p 02-07-2003 09:35 PM

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?

snowball179 02-07-2003 09:38 PM

nopoe...nothing worked so far :(

p00p 02-07-2003 09:42 PM

I suck ass, sorry I couldn't help.

*bump*

ThunderBalls 02-07-2003 09:46 PM

Well why don't you first let us know what OS you are using...

p00p 02-07-2003 09:49 PM

Try this

tar czvf yourdirectory.tar.gz /path_to_your_directory/directory

That has to work....

snowball179 02-07-2003 09:52 PM

I have linux (I think redhat).

snowball179 02-07-2003 09:53 PM

Quote:

Originally posted by p00p
Try this

tar czvf yourdirectory.tar.gz /path_to_your_directory/directory

That has to work....

That seem to work...thanks a lot !! :thumbsup

ThunderBalls 02-07-2003 10:31 PM

And when you want to extract it

gunzip filename.tar.gz

tar -xf filename.tar

LuSiD 02-07-2003 11:00 PM

Actually, it's much easier to extract a file with .tar.gz extension with this command:

tar zxvf filename.tar.gz

Plugger 02-08-2003 12:50 AM

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