Unzipping Directories

Hi
I am trying to unzip a directory. The zipped directory is uploaded by the user and I have to unzip it.
When I try to use java.util.zip it works fine for zipped files but not for diretcories.
So heres what i want to do:
I have a zipped folder app uder which are two files.
From the entire path (for e.g. C:\app\example1.doc, C:\app\example2.doc)
I would to retrieve the name app so i can create a new directory & then store the unzipped files.
But when i print m.group(1) it gives me the entire path. Any suggestions
<CODE>
try {
zipFile = new ZipFile(args[0]);
System.out.println(zipFile.getName());
Pattern p = Pattern.compile("(.*)\\.*.zip");
Matcher m = p.matcher(zipFile.getName());
if(m.find()){
System.out.println("the group is "+ m.group(1));
</CODE>
[NOTE]
PLEASE DO NOT REPLY BACK TELLING TO READ THE UNZIP file documentation. I am using that for unzipping files but when a directory (folder) is zipped the code breaks. below is the code that i am using. http://gethelp.devx.com/techtips/java_pro/10MinuteSolutions/10min0300.asp
The code breaks coz it doesnt create the initial directory. I mean if a folder called "Sample" is zipped where the path is "C:\Sample\doc1.doc ; C:\Sample\Doc2.doc" it fails to create Sample (folder/directory) at the server side and hence doc1.doc & doc2.doc are not copied. Instead with the above code link, if doc1.doc is zipped it can unzip it easily.
[NOTE]
Any help is appreciated
Thanx

Presuming that zipFile.getName() returns "app/example1.doc", then you can use File objects...
File file = new File(zipFile.getName());
File dir = file.getParentFile();
if(!dir.mkdirs()) {
throw new Exception("Failed to create directories for " + file.getAbsolutePath());
...

Similar Messages

  • Zipping  and Unzipping Directories and files both - URGENT PLEASE

    Hi friend,
    I tried for zipping and unzipping but it is not working still.
    and have to submit project tomorrow.
    so please as possible as fast just send me the source code that zip the file/folder and unzip in the same way as it was stored.
    ex : if we zip file c:/temp/myfolder/myfile.ppt to .zip
    unzip should c:/temp/myfolder/myfile.ppt
    thanks
    ghanshyam
    9879152949

    I believe (although I don't want to put words in his mouth) that Madan has run across a similar problem that I am trying to solve.
    For instance if I have the following files:
    c:\pic1.gif
    c:\pic2.gif
    c:\pic3.gifand I zip them in to a file called: pics.zip the will unzip just fine.
    However, if I have them in a directory:
    c:\pics\pic1.gif
    c:\pics\pic2.gif
    c:\pics\pic3.gifA listing of the zip files (all using java of-course) will show the files and dirs correctly:
    \pics\pic1.gif
      \pics\pic2.gif
      \pics\pic3.gifbut will give the following error if you try to un-zip them:
    "The system cannot find the path specified"The ZipEntry class has an 'isDirectory()' method, but it only returns true in the case of an EMPTY directory. If , as in my example, there is an actual file at the end of the entry, it returns false.
    So, at least in my case, I would be looking for advice on how to expand files that reside in directories within the zip file.
    Thank You for any help you can provide

  • Setups in Database installation or patch application

    Hi all,
    In the database installation or patch application, in the unzipped directories you have multiple
    setup.exe files along with oui.exe.
    For example: in 10g
    you have one setup.exe under directory 10gR2_server\database
    also you have one setup.exe and one oui.ex under directory 10gR2_server\database\install.
    I am wondering what are the differences among those setup.exe and oui.exe. Sometimes we tried the setup.ex in one directory it throw some error and tried another one it works. I am kind of confused.
    Thanks a lot for your help,
    Shirley

    Hi Shirley
    As far as I know setup.exe is starting the Oracle Universal installer and the oui.exe is called by the setup.exe.
    Sometimes your can perform silent install as this:
    oui.exe -waitforcompletion -nowait -force -silent -responseFile response_file.rsp
    Regards,
    Hub

  • Unzipping Files in the wrong folder

    Hi
    I am trying to unzip files. It works fine except that it unzips the files at the root. So i have tried specifying the path for making the directory (in which the unzipped files are stored). But that doesnt seem to work. Now i am unable to find the unzipped files. CAN ANYONE HELP PLEASE
    public static void unzipFile(String zFile)
            Enumeration entries;
            ZipFile zipFile;
           try {
                zipFile = new ZipFile(zFile);
                File file = new File(zipFile.getName());
                String fname = file.getName();
               String substr1 = fname.substring(0, fname.indexOf("."));
                String filepath = "/data/psawant/temp";
                File dir = new File(filepath, substr1);
                try {
                        dir.mkdir();
                catch (Exception fe)
                      System.err.println("Unhandled exception:");
                        fe.printStackTrace();
                        return;
                entries = zipFile.entries();
                while(entries.hasMoreElements()) {
                    ZipEntry entry = (ZipEntry)entries.nextElement();
                    if(entry.isDirectory())
                         // Assume directories are stored parents first then children.
                        System.err.println("Extracting directory: " + entry.getName());
                                          (new File(entry.getName())).mkdir();
                        continue;
                    } //end of if
                    System.err.println("Extracting file: " + entry.getName());
                    copyInputStream(zipFile.getInputStream(entry),
                        new BufferedOutputStream(new FileOutputStream(entry.getName())));
                 } //end of while
                zipFile.close();
                   } catch (IOException ioe)  {                 }
             } //end of unzip function
    public static final void copyInputStream(InputStream in, OutputStream out)
        throws IOException
            byte[] buffer = new byte[1024];
            int len;
            while((len = in.read(buffer)) >= 0)
            out.write(buffer, 0, len);
            in.close();
            out.close();
    Any help is apprciated
    Thanx

    Sorry I got it this time. I had overlooked the new File. I added that & it works fine but there seems to be some problem
    If the folder has another folder inside . it doesnt show that one. or rather just unzips one folder & no folders inside it. But i guess i can check for that
    Thanx for u r help
    Have a nice day

  • UnZipping an archive with folders inside

    Hello, everyone.
    A friend of mine asked me to create him an "auto-downloader" type of program, to download a ZIP archive, then extract the information to the user's computer (no, it is not harmful).
    Anyways, I've been trying mutliple ways, and I've come pretty far with the one I'm currently using. The only problem is, I'm using user.home as the file location for the zip, and creating a folder in there seems to just not want to work. This is the only way I could think of doing it, but I'm sure there are easier ways.. here's what I'm using:
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.io.BufferedInputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.net.URL;
    import java.net.URLConnection;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipInputStream;
    import javax.swing.JFrame;
    import javax.swing.JProgressBar;
    public class Updater extends Thread {
         private String name;
         public void get(String url, String fileName) {
              name = fileName;
              JFrame frame = new JFrame(name.replaceAll(".zip", "") + " update");
              frame.setLocationRelativeTo(null);
              frame.setLayout(new BorderLayout());
              frame.setPreferredSize(new Dimension(500, 80));
              frame.setResizable(false);
              frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
              Client client = new Client();
              ClassLoader cl = getClass().getClassLoader();
              try {
                   URLConnection connection = (new URL(url)).openConnection();
                   String f[] = url.split("/");
                   File file = new File(f[f.length - 1]);
                   int length = connection.getContentLength();
                   InputStream instream = connection.getInputStream();
                   try {
                        new File(updatedDirectory()).mkdir();
                   } catch (Exception e) {
                        e.printStackTrace();
                   FileOutputStream outstream = new FileOutputStream(updatedDirectory() + file);
                   int size = 0;
                   int copy = 0;
                   JProgressBar bar = new JProgressBar();
                   bar.setStringPainted(true);
                   bar.setMaximum(length);
                   frame.add(bar, "Center");
                   frame.pack();
                   frame.setVisible(true);
                   while ((copy = instream.read()) != -1) {
                        outstream.write(copy);
                        size++;
                        int percentage = (int) (((double) size / (double) length) * 100D);
                        bar.setValue(size);
                        bar.setString("Updating your " + name.replaceAll(".zip", "") + " - " + percentage + "% complete");
                   if (length != size) {
                        instream.close();
                        outstream.close();
                   } else {
                        instream.close();
                        outstream.close();
                        unzip();
                        //System.exit(0);
                        frame.setVisible(false);
              } catch (Exception e) {
                   System.err.println("Error connecting to update server.");
                   e.printStackTrace();
         private void unzip() {
              try {
                   System.out.println(updatedDirectory() + "animations\\raw");
                   InputStream in = new BufferedInputStream(new FileInputStream(updatedDirectory() + name));
                   ZipInputStream zin = new ZipInputStream(in);
                   ZipEntry e;
                   //new File(updatedDirectory() + name.replaceAll(".zip", "")).mkdir();
                   if (!new File(updatedDirectory() + "animations\\raw").exists()) {
                        if (new File(updatedDirectory() + "animations\\raw").mkdir()) {
                             System.out.println("worked");
                        } else {
                             System.out.println("nope");
                   while ((e = zin.getNextEntry()) != null) {
                        unzip(zin, updatedDirectory() + e.getName());
                   zin.close();
              } catch (Exception e) {
                   e.printStackTrace();
         private void unzip(ZipInputStream zin, String s) throws IOException {
              FileOutputStream out = new FileOutputStream(s);
              byte[] b = new byte[1024];
              int len = 0;
              while ((len = zin.read(b)) != -1) {
                   out.write(b, 0, len);
              out.close();
         public final String updatedDirectory() {
              //File file = new File(System.getProperty("user.home") + "\\info\\");
              File file = new File("..\\");
              if (file.exists() || file.mkdir()) {
                   //return System.getProperty("user.home") + "\\info\\";
                   return "..\\";
              return null;
    }Here's the ZIP archive I'm trying to download: http://www.2shared.com/file/Qu1cSWcl/cache.html
    If what I've said before doesn't make sense (mind you me, it's 4 am and I'm about to crawl into bed), then I'll try to sum it up in a few short words below.
    I'm trying to extract a ZIP archive with folders, every time I do, it stops halfway through and throws an error similar to this:
    invalid cache index specified
    ..\animations\raw
    java.io.FileNotFoundException: ..\animations\raw (The system cannot find the pat
    h specified)
            at java.io.FileOutputStream.open(Native Method)
            at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
            at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
            at Updater.unzip(Updater.java:99)
            at Updater.unzip(Updater.java:90)
            at Updater.get(Updater.java:64)
            at Client.main(Client.java:2548)
    Press any key to continue . . .I'm just trying to be able to extract cache (ZIP ARCHIVE) which has folders inside. I've tried creating a directory for the folder, but it seems to not work, hence the "?" in the above error (i printed that if the directory failed to create a new directory, as seen in my above code). Once again, sorry if this isn't as understandable as it should be, I'm not myself without sleep :)
    Also, do ignore the first print, 'invalid cache index specified', it's not related to the problem.
    Edited by: aeternaly on Jul 2, 2010 4:04 AM

    So your question is really about how to make a directory, then. Nothing at all to do with unzipping of archives.
    If you can't create a directory, then perhaps there is some permissions problem. You don't have the authority to create directories in some directory. Or perhaps you're trying to use a name which isn't a valid directory name in your system. Or... there are many other possibilities. But anyway I recommend tossing all of that unzipping business out of your program and just trying to write something which creates a directory. Debug that first.

  • Unzip/ Untar files

    I am remotely logged into a UNIX cluster at the university and attempting to manipulate some files that I have received from a collaborator. He has "tarred" and "zipped" the files. Unzipping the file with the command
    <remote host:directory>% gunzip file.tar.gz
    (remote host is the machine I am logged into (via ssh -X username): directory is my directory on the remote host)
    This creates the unzipped file- file.tar on <remote host:directory>. The problem arises when I attempt to untar the file. I am using the command
    tar -xvfp file.tar
    After entering this command, I get the message
    tar: can't mkdir /net: Permission denied
    tar extract: failed mkdir of <:senders directory>
    The same error is produced using [tar -xvf] as the bundled-options. I am assuming that it is attempting to make the directory on my collaborators remote host because the listed location of the failed mkdir is the senders directory <:senders directory> on a different UNIX cluster.
    I have tried variations on the tar command (-x or -xv) but those produce the error
    tar: tape read error: no tape in drive
    I am a bit unfamiliar with the syntax for the [[-]bundled-options Args] in the tar command, but I suspect that I need to specify where the untarred archive is going to be written/ copied. Could anyone provide some guidance on this.
    Sincerely,
    Aric

    Hi Aric,
       Did you copy the error message verbatim? Does it really want to create the directory, /net? If so then the problem is likely to be in the tarball itself.
       There's nothing wrong with your initial syntax. The -x tells tar to unpack the tarball, which is what you're trying to do. The -p says to preserve permissions, which is fine. The 'p' is not supposed to go after the 'f' in the options because the tarball, file.tar, is technically an argument of the -f option. However, most implementations of tar are rather forgiving in that regard. The -v option simply tells tar to be verbose and list the files. Of course there are many implementations of tar and you don't bother to tell us into what kind of machine you're logged.
       Tar has the ability to archive many files and preserve the directory structure. However, it has to recreate those directories when unpacking and that's when it had a problem. It seems that tar wants to create a directory named "net" at the root of the boot drive. I assume that the creator of the tarball archived such a directory on his machine.
       However, most implementations of tar strip the leading slash, turning an absolute path into a relative path. That way when unpacked, the directory structure starts at the current working directory. Unless you tried to unpack this tarball from the root directory of the boot drive, the tar that created this tarball appears to be different.
       Unless you can get the privilege of writing to the root of this boot drive, I would guess that your only recourse is to get the person who created the tarball to redo it using relative paths. See if you can get him to create it with GNU's tar, as that version strips the leading slashes by default.
    Gary
    ~~~~
       OK, so you're a Ph.D. Just don't touch anything.

  • I have problem in this unzip java codes

    hi all,I have problem in this unzip java codes,I think either the pathway that i put C:.......is wrong or the codes are wrong because when i run it, the zipped folder is not unzipped. So anyone has another set of example or know how to correct it? Thanks!Please post the solution here!
    This is the set of codes that i have:
    import java.io.*;
    import java.util.*;
    import java.util.zip.*;
    public class Unzip {
    public static final void copyInputStream(InputStream in, OutputStream out)
    throws IOException
    byte[] buffer = new byte[1024];
    int len;
    while((len = in.read(buffer)) >= 0)
    out.write(buffer, 0, len);
    in.close();
    out.close();
    public static final void main(String[] args) {
    Enumeration entries;
    ZipFile zipFile;
    if(args.length != 1) {
    System.err.println("Usage: Unzip zipfile");
    return;
    try {
    zipFile = new ZipFile("C:\\Temp\\FolderZiper.zip");
    entries = zipFile.entries();
    while(entries.hasMoreElements()) {
    ZipEntry entry = (ZipEntry)entries.nextElement();
    if(entry.isDirectory()) {
    // Assume directories are stored parents first then children.
    System.err.println("Extracting directory: " + entry.getName());
    // This is not robust, just for demonstration purposes.
    (new File(entry.getName())).mkdir();
    continue;
    System.err.println("Extracting file: " + entry.getName());
    copyInputStream(zipFile.getInputStream(entry),
    new BufferedOutputStream(new FileOutputStream(entry.getName())));
    zipFile.close();
    } catch (IOException ioe) {
    System.err.println("Unhandled exception:");
    ioe.printStackTrace();
    return;
    }

    What does the program output when it's executed? Can you copy the screen and post it here? More info can help solve the problem.
    What exactly is the program supposed to do?
    Add some more println() to show the program flow and what the values of key variables are. For example what is in entries after the entries() method is executed?
    Some prep work on your part would make it easier for us to help.

  • Unzip Xtra for Mac

    Hi All,
    I am developing a hybrid application which receives updates
    in ZIP from the web. Windows is no problem. I am using the bundled
    Unzip Xtra in Director. The problem is that, the file and folder
    names in the bundled updates, sometimes are more than 32 characters
    long. As a result, the Unzip xtra on Mac will truncate the
    file/folder names to under 32 characters thus ruining my updates. I
    searched for an Unzipping xtra for Mac but could ot find any that
    would allow for unzipping more than 32 character long file/folders.
    Any ideas how do I proceed with this?
    Thanks in advance.
    Nitin.

    Andrew Morton wrote:
    >> Can anyone please tell me if there is a MAC OSX xtra
    that can unzip
    >> files, I'm developing a cross platform project and
    it will need to
    >> unzip a file. I have budUnzip doing the job on PC.
    >
    > You could try baRunProgram (from the buddyAPI xtra) to
    run gzip to
    > unzip files. OSX comes with gzip.
    Go with Luke's idea - baRunProgram on a Mac doesn't take
    command line
    arguments, although I'm not sure OS X comes with unzip - two
    I just checked
    didn't (OS X 10.3 and 10.4). Gzip is pretty much a certainty.
    Andrew

  • Using Java To Unzip

    I have a zip file with a nested directory structure, with most folders containing files as well as other directories. I want to do use java's zip utilities to unzip the file.
    Here's the twist: For each file (but not each directory) I want to read the file, write some extra text to the end of it, and then write it out into its appropriate place in the directory tree.
    I know I get can use entries() to get an enumeration of entries in the zip file, and then I could use recursion to spider down into directories. But I thought maybe there was a simpler way, so that I didn't have to write the spidering code myself. Seems like this would be a common problem...
    Thanks for any ideas/code,
    John

    I know I get can use entries() to get an enumeration
    of entries in the zip file, and then I could use
    recursion to spider down into directories. But IUhm, Zips are flat, aren't they? No need for recursion... all entries are at top level.

  • Create file with subdirectories? (Unzip)

    Hi, when following the example to unzip the contents of a zip file (http://developer.java.sun.com/developer/technicalArticles/Programming/compression/
    ), it fails when the files are situated in subdirectories.
    So there is no way to create a file in not yet existing subdiretories directly? I'll have to parse the filename and create non-existing directories, or is there another, simpler way?
    Thanks
    Heiko

    use mkdirs().. it'll create all dir and subdirs..
    import java.io.*;
    class  CreateDir
         public static void main(String[] args) throws Exception
              File f = new File("C:/ram/code/dir/test/xyz/abc");
              f.mkdirs();
              System.out.println("Hello World!");
    }regards
    raamam

  • Problem in deleting Zip files unzipped using java.util.zip

    I have a static methos for unzipping a zip file. after unzipping the file when i am trying to delete that file using File.delete()its not getting deleted. but when methods like exist(). canRead(), canWrite() methods are returning true what can be the possible problem ? i had closed all the streams after unzipping operation Please go through the following code.
    public static boolean unzipZipFile(String dir_name, String zipFileName) {
    try {
    ZipFile zip = new ZipFile(zipFileName);
    Enumeration entries = zip.entries();
    while (entries.hasMoreElements()) {
    ZipEntry entry = (ZipEntry) entries.nextElement();
    // got all the zip entries here
    // now has to process all the files
    // first all directories
    // then all the files
    if (entry.isDirectory()) {
    // now the directories are created
    File buf=new File(dir_name,entry.getName());
    buf.mkdirs();
    continue;
    }// now got the dirs so process the files
    entries = zip.entries();
    while(entries.hasMoreElements()) {
    // now to process the files
    ZipEntry entry = (ZipEntry) entries.nextElement();
    if (!entry.isDirectory()){
    File buf=new File(dir_name,entry.getName());
    copyInputStream(
    zip.getInputStream(entry),
    new BufferedOutputStream(
    new FileOutputStream(buf)));}
    } catch (IOException e) {
    e.printStackTrace();
    return false;
    return true;
    now i am trying to call this method to unzip a zip file
    public static void main (String arg[]){
    unzipZipFile("C:/temp","C:/tmp.zip");
    java.io.File filer = new File("C:/tmp.zip");
    System.out.println (filer.canRead());
    System.out.println (filer.canWrite());
    System.out.println (filer.delete());
    Please tell me where my program is going wrong ?

    Thanks .. the problem is solved... i was not closing the Zip file .. rather i was trying to close all the other streams that i used for IO operaion ... thanks a lot

  • Unzip and +w permission issues

    Dear Experts,
    I'm trying to unzip one of Oracle's EBusiness suite files.
    I kept getting issues like:
    unzip B24483-01.zip
    checkdir error: cannot create doc/upgrade.1012
    unable to process doc/upgrade.1012/upgrade/toc.htm.
    checkdir error: cannot create doc/upgrade.1012
    unable to process doc/upgrade.1012/upgrade/trouble_upgrade.htm.
    This directory had been previously unzipped.
    It turned out that the parent directory didn't have write permissions.
    ls -l /appsinstall/StageR12
    dr-xr-xr-x 3 oracleapps dba 4096 Aug 13 2008 doc
    So during unzip, the directory was created, but nothing could be
    written to the directory!
    I changed the permissions, and a subsequent unzip worked.
    chmod +w  ` find . -type d |cut  -d / -f2 | uniq  `
    But if that wasn't enough, there were new directories
    inside the zip file. And they too, were zipped up
    without the correct (+w) permissions!
    This became an iterative process to fix.
    Try to unzip.
    Observe writing to the directories fail.
    Change the permissions on these new directories.
    Repeat, selecting N for overwrite None.
    Lots of wasted time.
    I don't want to do the unzipping as root.
    Is there a flag to use with unzip to deal with this issue?
    Force directories to be created, but not overwrite anything?
    Or, change the permissions on the directories to +w as they are created?
    Thanks a lot!

    I was the first person posting (I think) on this right after the security update 2008-2. I've watched the boards and the answer is "nada." I think apple isn't too interested in poor old Tiger. And if that isn't bad enough, if you have any leopard machines...good luck. So far I can't get them to log in to IMAP or POP under 10.4.11 mail. Only way to get it to work? Kill off Kerberos. Sad but true.

  • Unzip multiple bzip files thru powershell

    Hello there-
    I have 50 directories. Each directory has 10 sub directories in which there are 300 bz2 files. I would like to unzip them thru bzip program. Is it possible to do so with powershell/batch/cmd line script?
    Dir1>Subdir1>*.bz2
          >Subdir2>*.bz2
          >Subdir10>*.bz2
    Dir2>Subdir1>*.bz2
          >Subdir2>*.bz2
          >Subdir10>*.bz2
    Thanks,
    Ben

    Hi,
    To unzip files, I would like suggest you refer below code, those code is to find all current location zip files and unzip them to the current location:
    $shell=new-object -com shell.application
    $CurrentLocation=get-location
    $CurrentPath=$CurrentLocation.path
    $Location=$shell.namespace($CurrentPath)
    $ZipFiles = get-childitem *.zip
    $ZipFiles.count | out-default
    foreach ($ZipFile in $ZipFiles)
    $ZipFile.fullname | out-default
    $ZipFolder =
    $shell.namespace($ZipFile.fullname)
    $Location.Copyhere($ZipFolder.items())
    If you want to unzip many location files, we could use get-childitem to get all of them and saved in a variable.
    For more details, please refer to the below link:
    PowerShell script to unzip many files
    http://www.techiebirdsnest.com/2009/01/powershell-script-to-unzip-many-files.html
    Hope this helps.
    Regards,
    Yan Li
    Yan Li
    TechNet Community Support

  • Bash: unzip file and move into directory if directory created

    I'm writing a script that decompresses zipped/rared files.
    The zips typically have content in a one directory or not contained in a directory.
    Is there a way to see if the unzip process created a directory and move into it or if one wasn't created to operate on the files extracted in the PWD?
    So far the rar files have only had data that gets extracted to PWD, but if I see some with files in directories I'd like for a solution that might work in that case as well.

    Would zipinfo' help?  It lists zip archive files in a format similar to 'ls -l'.
    I only tried this on two zipfiles, and I'm concerned about how foolproof this may or may not be.
    Zipinfo lists the files in the opposite order that they were placed into the zipfile, I think.  If the first file placed into the zip was the parent directory, and so contains all the other files, the listing will be something like that shown below, with the container directory always on the next-to-last line of zipinfo's output:
    -rw-a-- 2.0 fat 1057 tx defX 09-Nov-12 17:56 examples/README.txt
    drwx--- 2.0 fat 0 bx stor 09-Nov-12 16:48 examples/
    42 files, 508682 bytes uncompressed, 133398 bytes compressed: 73.8%
    So one would have to test if the next-to-last line of zipinfo's output begins with 'd' (directory) or '-' (regular file).
    Off the top of my head, with not-so great command-line skills, I came up with:
    zipinfo example.zip | tail -n 2 | grep '^d'

  • Unzip the disk1 files

    I can't unzip the zipped disk 1 files for the installation of Oracle 9i database. I find no programme for the unzip of the files with the file extention .cpio

    Hi Hugo,
    1) Create directories to extract the files { say
    Disk 1 , Disk 2 , Disk 3 }
    2) cd Disk1
    3) cpio -idmv < filename.cpio
    or
    cpio -idmv < filename.cpio.gz
    Rgds,
    Vishwanath U

Maybe you are looking for

  • Unable to retrieve collections from the Search Service.

    Hi, I have a user trying to upload a collection. She gets the following error: Unable to retrieve collections from the Search Service. Please verify that the ColdFusion MX Search Server is installed and running. Obviously, I checked the service. It w

  • Doesn't have XI adapter on Adapter Engine Monitor

    Hi Experts, I am doing File2File scenario with J2SE->XI->J2SE direction. So that I created a communication channel(CC) with XI type and Receiver role. It have no error, the status of message is always "Waiting". The sender and receiver file adapter o

  • Suddenly I can't import photos into Lightroom 5.

    The source directory displays correctly but the photos in that directory are not displayed. I've tried with both my card reader and hard drive with the same result.

  • Mac Mini Server Hd disappeared. Will not boot anymore!

    I have a Mac Mini Server about 3 years old running Leopard. I noticed that my server HD had disappeared and was not even showing in disk utilities. The 2nd HD which I had setup for backup was still there and presumably bootable. I checked with disk u

  • Instant Client Package - SDK, RPM package download not working

    Hi, I am trying to download "Instant Client Package - SDK", RPM package for Linux 32 bit, version 11.2.0.1.0 from http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html However the file downloaded has zero length. I tr