Find the answer to your Linux question:
Results 1 to 2 of 2
I'd have to use .zip arcives, so I'll need to use the command zip. My question is: I have a folder ("base") containing a file ("something.txt") and some subfolders. I'd ...
  1. #1
    Linux Enthusiast minthaka's Avatar
    Join Date
    May 2006
    Location
    Mol, Vojvodina
    Posts
    556

    Need some help with .zip archives

    I'd have to use .zip arcives, so I'll need to use the command zip. My question is:
    I have a folder ("base") containing a file ("something.txt") and some subfolders. I'd like to create an archive which would contain something.txt and one of the subfolder called "mysub" together with its content. Off course I don't want to have the relative directory structure above the starting folder "base". Is it possible to make it?
    If you need a CD/DVD catalogizer, give a try to my program:
    http://www.kde-apps.org/content/show...content=100682
    Linux Usert#430188

  2. #2
    Just Joined! simon's Avatar
    Join Date
    Oct 2005
    Location
    New Zealand
    Posts
    29
    if you're in base and you want something.txt and the subfolders archived, it's:

    zip -r foo.zip *

    ...whereas if you want the archive to contain "base" itself, cd .. and type:

    zip -r foo.zip base

Posting Permissions

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