Results 1 to 4 of 4

Thread: Shell script help

  1. #1
    Join Date
    Nov 2007
    Beans
    18

    Exclamation Shell script help

    I am trying to use ditto to create zip archives of every folder inside of the main folder.

    Here is what I am using right now:

    ditto -c -k -X --rsrc Zip Zip.zip

    I need to be able to zip multiple folders,but not in one archive in separate zip archives.

    It is also important that I use ditto because it is the only way to preserve resource files. Please HELP!

    Thanks, Flashuni

  2. #2
    Join Date
    Feb 2007
    Beans
    4,045
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Shell script help

    There doesn't appear to be any ditto-commands in the hardy repositories, so chances are there are few who knows what that command is or does. You should add some information about it (link to man-page or something)

    And why are you using zip? why not tar.gz or tar.bz2?

    Sounds like the commands find and tar can achieve the same thing.

  3. #3
    Join Date
    Jan 2007
    Beans
    Hidden!

    Re: Shell script help

    Quote Originally Posted by flashuni View Post
    It is also important that I use ditto because it is the only way to preserve resource files.
    What are resource files?

  4. #4
    Join Date
    Nov 2006
    Location
    Belgium
    Beans
    3,025
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Shell script help

    something like this
    Code:
    for ITEM in list_of_directories; do
      ditto $ITEM $ITEM.zip
    done
    I assume you're using Mac ?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •