Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 09-19-2005, 11:17 PM   #1
datatank
Confirmed User
 
datatank's Avatar
 
Join Date: Aug 2004
Location: My dog is blacker than Tupac
Posts: 5,471
Linux dudes need help. need to zip on the server 20 folders

I have 20 folders on a linux box and I need to zip the contents of each folders into folder name.zip Does anyone now the command?


Thanks
datatank is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-19-2005, 11:30 PM   #2
TexasDreams
former Miserable Admin :)
 
Join Date: Oct 2003
Location: Somewhere in Cali
Posts: 4,700
Quote:
Originally Posted by datatank
I have 20 folders on a linux box and I need to zip the contents of each folders into folder name.zip Does anyone now the command?


Thanks
Use a tar -cvf type command.

http://www.asu.edu/it/fyi/dst/helpdo.../disk/tar.html

__________________
ICQ: 168-914-369 >>> sysop [at] TexasDreams [dot] com
TexasDreams is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-19-2005, 11:31 PM   #3
High Plains Drifter
Confirmed User
 
High Plains Drifter's Avatar
 
Join Date: Jun 2005
Location: ♠ ♣ ♥
Posts: 2,341
man zip

....
__________________
High Plains Drifter is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-19-2005, 11:32 PM   #4
BigBen
Confirmed User
 
Join Date: Nov 2004
Location: scv
Posts: 2,299
Quote:
Originally Posted by TexasDreams
After you do that, do a gzip to compress your archive and you now have .tar.gz
BigBen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-19-2005, 11:33 PM   #5
Meorazhar
Confirmed User
 
Meorazhar's Avatar
 
Industry Role:
Join Date: May 2005
Location: ICQ: 5262689
Posts: 672
go to that folder and issue this command
Code:
zip -r name.zip .
Meorazhar is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-19-2005, 11:44 PM   #6
datatank
Confirmed User
 
datatank's Avatar
 
Join Date: Aug 2004
Location: My dog is blacker than Tupac
Posts: 5,471
I need a .zip not a tar
datatank is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-19-2005, 11:47 PM   #7
TexasDreams
former Miserable Admin :)
 
Join Date: Oct 2003
Location: Somewhere in Cali
Posts: 4,700
Quote:
Originally Posted by datatank
I need a .zip not a tar
Grab winRAR. Beats the crap out of limiting yourself to just zip files!

http://www.download.com/3000-2250-10007677.html

__________________
ICQ: 168-914-369 >>> sysop [at] TexasDreams [dot] com
TexasDreams is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-19-2005, 11:49 PM   #8
Doc911
Confirmed User
 
Join Date: Feb 2004
Location: If i was up your ass you'd know
Posts: 3,695
Quote:
Originally Posted by datatank
I have 20 folders on a linux box and I need to zip the contents of each folders into folder name.zip Does anyone now the command?


Thanks
bin/bash/slapaho/zip -balls_caught_in_zipper

seriously though why zip when you can tar?
__________________


For PHP/MySQL scripts ICQ 161480555 or email [email protected]
Doc911 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-19-2005, 11:51 PM   #9
datatank
Confirmed User
 
datatank's Avatar
 
Join Date: Aug 2004
Location: My dog is blacker than Tupac
Posts: 5,471
im sorry. My problem is I have a script in the server that needs zips
datatank is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-20-2005, 01:19 AM   #10
Kyo
Registered User
 
Join Date: Jul 2005
Location: VA, USA
Posts: 87
Quote:
Originally Posted by datatank
im sorry. My problem is I have a script in the server that needs zips
Go to the top level directory (the one that contains the subdirs you wanna zip up), and give this command:

find . -type d -maxdepth 0 -exec zip -ur {}.zip {}/* \;

The find command will start in your current working directory (.), look for all things that are directories (-type d), and for each, it will execute (-exec ... \;) the command given, substituting {} for the name of the directory found. The -maxdepth 0 makes sure it doesn't go into the subdirectories recursively.

The command (zip -ur) does the standard update/recursive zip.

do a "man find" and a "man zip" to fine tune the options.

Last edited by Kyo; 09-20-2005 at 01:22 AM..
Kyo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-20-2005, 01:23 AM   #11
Kyo
Registered User
 
Join Date: Jul 2005
Location: VA, USA
Posts: 87
Quote:
Originally Posted by Kyo
find . -type d -maxdepth 0 -exec zip -ur {}.zip {}/* \;
Err, make that "-maxdepth 1". Sorry.
Kyo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.