This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
create_zip_file_and_store_at_one_location_based_on_folder_name [2009/05/02 07:00] k2patel |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | === Create Zip file and Store Based on Folder name === | ||
- | <code bash> | ||
- | #!/usr/local/bin/bash | ||
- | |||
- | cd /usr/www/virtual/xposed/gallery.privategwen.com/members/videos | ||
- | |||
- | for i in `ls /usr/www/virtual/xposed/gallery.privategwen.com/members/videos` | ||
- | do | ||
- | if [ -e /usr/www/virtual/xposed/gallery.privategwen.com/members/autozip/$i.zip ]; then | ||
- | echo "Exists..skipping...." | ||
- | else | ||
- | echo "creating zip for $i" | ||
- | /usr/local/bin/zip -r /usr/www/virtual/xposed/gallery.privategwen.com/members/autozip/$i.zip $i | ||
- | echo "zip done....." | ||
- | fi | ||
- | chown -R xposed:xposed /usr/www/virtual/xposed/gallery.privategwen.com/members/autozip/$i.zip | ||
- | done | ||
- | </code> |