Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Simple question for someone who knows anything about zip

  1. #11
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    5,342
    Distro
    Ubuntu

    Re: Simple question for someone who knows anything about zip

    Quote Originally Posted by yaroto98 View Post
    I should be able to just say in one command "zip this directory and everything underneath it, and nothing above it". That doesn't seem like it's asking too much does it?
    Well, there's no "should" or "shouldn't" about it, it's just the way it is.

    The manual for zip says, "... paths stored in zip archives are always relative." Zip actually is deliberately programmed that way.

    You could get the zip source code and modify it to add a new option to specify the starting directory. But that would be an awful lot of work!

    Do you have to use zip? Would tar + bzip2 do? If so, you can do it in one command with tar's --directory and --bzip2 options.
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

  2. #12
    Join Date
    Mar 2009
    Beans
    97
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Simple question for someone who knows anything about zip

    Yea, unfortunately I do have to use zip, unless another program can use the same zip algorithm.

  3. #13
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    5,342
    Distro
    Ubuntu

    Re: Simple question for someone who knows anything about zip

    In that case, you're stuck with pushd, zip, popd.
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

Page 2 of 2 FirstFirst 12

Tags for this Thread

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
  •