Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

gzip question

  • 15-05-2006 12:48pm
    #1
    Closed Accounts Posts: 169 ✭✭


    I've read the man pages, googled for tutorials but I still don't know the answer.

    I have a script which is responsible for downloading a series of zip files.
    They all have a file heirarchy
    /a/b/c/d/e/f/<target>
    so if I try to extract them within my script, I keep getting
    /targetUnzipPath/a/b/c/d/e/f/file

    Is there any way to get gzip to disregard the heirarchy and decompress everything into the folder that it's currently in?


Comments

  • Registered Users, Registered Users 2 Posts: 6,571 ✭✭✭daymobrew


    I highly doubt that it is possible using gzip alone.

    You can probably get everything into the current folder using find:
    #Find all files and mv them into the current directory
    find targetUnzipPath -type f -exec mv "{}" . ";"
    


  • Closed Accounts Posts: 169 ✭✭akari no ryu


    Between myself and our tech, we came to the conclusion you were probably right, daymobrew. We're gonna install the gzip libraries for PHP and use them. Solves all our problems, really.


Advertisement