Find the answer to your Linux question:
Results 1 to 5 of 5
hi guys, i am trying to unzip only 1 directory in my .zip file, the reason is that i don't have enough space to unzip all the contents of .zip ...
  1. #1
    Just Joined!
    Join Date
    Mar 2010
    Posts
    2

    Unzip a directory insed .zip file

    hi guys,

    i am trying to unzip only 1 directory in my .zip file, the reason is that i don't have enough space to unzip all the contents of .zip file.

    and i am trying to do it with unzip command..


    anybody knows how to do it?

    read man pages.. didn't find any flag that might help..

    thank you all in advance

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,970
    What is the format of the unzip'd volume? Is is a tar archive, or what?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Mar 2010
    Posts
    2
    as i stated it is a .zip file, with a .zip extension, it is about 2G so no space for unzipping all of it..

  4. #4
    Just Joined!
    Join Date
    Jul 2008
    Posts
    81
    Quote Originally Posted by poki79 View Post
    as i stated it is a .zip file, with a .zip extension, it is about 2G so no space for unzipping all of it..
    First of course see what is present in the .zip file
    $ unzip -l file.zip

    Then select and extract part of it
    $ unzip file.zip "part/you/want/*" -d /where/to/put/it

  5. #5
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    623
    You can use a gui archive manager like File Roller (aka "Archive Manager" in the Gnome Applications menu in Fedora), for instance. You'll be able to select the folder and unzip it.

    Or use a wildcard file spec with the unzip command, e.g.
    mkdir directory
    cd directory
    unzip ../zipfile.zip directory/*

    That will unzip the directory and all files and subdirectories. Dunno why unzip won't accept just the directory name and unzip it.

Posting Permissions

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