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.
|