Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I have the following directory structure: /abc/123 /abc/234 /abc/345 /abc/xyz/678 /abc/xyz/789 /abc/xyz/890 /abc/efg/987 /abc/efg/765 /abc/efg/654 I want to create a zip file, using 'zip', of the above but without ...
  1. #1
    Just Joined!
    Join Date
    Jun 2008
    Posts
    1

    Zip Directories ignoring Base Directory

    Hi,

    I have the following directory structure:

    /abc/123
    /abc/234
    /abc/345
    /abc/xyz/678
    /abc/xyz/789
    /abc/xyz/890
    /abc/efg/987
    /abc/efg/765
    /abc/efg/654

    I want to create a zip file, using 'zip', of the above but without the /abc. zip -j removes /xyz/ and /efg/ which is not what I want.

    Anyone have any ideas?

    Thanks

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    Just cd into /abc and run zip from there.

    Code:
    cd /abc; zip ~/file.zip *

  3. #3
    Linux Engineer khafa's Avatar
    Join Date
    Apr 2008
    Location
    Tokyo, Japan
    Posts
    858
    hi,

    what about
    Code:
    zip destination_name /abc/*
    does not work?

    Edit- i92guboj was faster
    Linux and me it's a love story

Posting Permissions

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