Zipping multiple directories
Hi guys i have multiple directories as such
.../Claymore/1.001/ .../Claymore/1.002/ .../Claymore/1.003/ .../Claymore/etc... How do I compress each directory inside /Claymore/ using the names of the directories for the names of the output tar or zip files. |
I do basically what you want in my blog entry. The only part you would need would be this...
Code:
for x in `ls -w 1`;do zip -r $x.zip $x;done; |
Quote:
|
just in a terminal would work for a one shot use, i do something like that all the time, or you could save it in a text file named something like 'multizip.sh' and chmod +x the file so you can run it as a shell script from within the current directoyr (or move it somewhere in the path like /usr/bin or /usr/local/bin as root)
|
All times are GMT -5. The time now is 05:41 PM. |