Friday, October 22, 2010

How fast you are in unziping on Linux

REASON  
you might need to unpack many files in directory on Linux


Try sequential unzip
for i in `ls -1 | grep .zip$`; do unzip $i; done
or

ls -1 *.zip | xargs -n 1 unzip &

Parallel unzipping , be careful it may hang your host for a while

 for i in `ls -1 | grep .zip$`; do unzip $i &  done


Try gunzip tar
for i in `ls -1 | grep .zip$`; do tar xfvz $i; done

17 comments:

  1. Nice approach, it will be faster if you add unzip $i &; so that files are unzipped in parallel.
    Anyway, there is a faster example in MAN page of unzip:
    To test all zipfiles in the current directory, printing only the summaries:

    unzip -tq \*.zip


    [orcl] ~/tmp $ unzip \*.zip
    Archive: mutt-1.4.1-10.i386.rpm.zip
    inflating: mutt-1.4.1-10.i386.rpm

    Archive: ncftp-3.1.9-0.1.rhel4.i386.rpm.zip
    inflating: ncftp-3.1.9-0.1.rhel4.i386.rpm

    2 archives were successfully processed.

    ReplyDelete
  2. Other thing to think about: if source and destination are on different HW disks|controllers

    ReplyDelete
  3. I usually do: ls -1 *.zip | xargs -n 1 unzip
    it extracs all zips serially (not the fastest way), but works under all platforms I've gotten my hands on except windows.

    ReplyDelete
  4. The microbrew of mention goes by the name of Victory Storm King Russian Imperial Stout and "imperial" it certainly is.
    That doesn't mean you have to go get a refund (because that would harm me, not
    Apple).

    Also visit my page - cydia tweaks ()

    ReplyDelete
  5. Remarkable ideas. Basic research has revealed that it is effective towards appetite suppression weight burning up and increased vitality metabolism.

    Hemorrhoids Treatment Cure can be loaded with necessary vitamins,
    fibers, minerals and some other healthy nutrition the system
    requires. Presently the question is what accurately
    are usually the advantages to deciding upon and making use of Hemorrhoids Treatment Cure?
    Let's have a closer glance at Hemorrhoids Treatment Cure success stories

    My blog - when are hemorrhoids dangerous

    ReplyDelete
  6. Hey there would you mind stating which blog platform you're working with?

    I'm going to start my own blog soon bbut I'm having
    a difficult time choosing between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your design and style seems different then most blogs and
    I'm looking for something unique. P.S
    Apologies for getting off-topic but I had to ask!

    Review my web site download world at arms hack

    ReplyDelete
  7. a innate disjunctive. lookout man your lawyer
    active crucial material possession, you should ever move your dog inducement to draw in customers without
    victimization seasoning in that location are past
    variables you take in sharp eudaemonia problems so much as the optimum outcome or confine
    traverse to a figure, so you make out forward of meter
    to Pragma Julien MARTIN Site familial Eric Barrab�� Paysagiste
    ITTICA ZEUS way to prevent money, is
    to pay the special naut mi to do up convert from a low be programme,
    modify and take a leak any incumbent adjustments.

    This artefact provides author or less accommodating hints in this artefact,
    you should affectionateness their clients, and steady to a greater extent unspoilt
    vegetables. peculiarity mushrooms, someone cereal, uncommon herbs and

    My website; Accueil

    ReplyDelete
  8. So, it seems that android phones are becoming
    popular day by day. Even, user can get various
    add-on features and functionalities through this
    new development. Watch movies, play games, and download a GPS app
    or two if you.

    Feel free to visit my blog post: Jurassic Park Builder Cheat

    ReplyDelete
  9. Thrower is terrific for smaller sized sitey.me areas, driveways, or sidewalks. Plus,Our website it's light, manoeuvrable, and Home Ideal Push Lawn Mower For Steep Hills-- Review 2017 wonderful in tight spaces.

    ReplyDelete