untar tarred files and more...

Posted on 2004-10-27
Last Modified: 2011-09-20
Need to know how to create a specialized file management cgi script, preferrably a shellscript, perl if necessary, to untar uploaded tar files within a directory.  The script would also keep the original directory structure contained within the tarball.  This script would be run from a password protected HTML form, ie; clicking a web button would untar the tar file into its own directory (the name of the directory would be from from the filename).  Having some sort of chooseable directory/file listing within the HTML page would be a plus.  

Originally, I wanted to be able to use cron to automatically schedule the untarring of the files at a certain time but I do not have root access to the server, which also means I dont have the ability to install any perl modules.  

Question by:tomdotblack
    1 Comment
    LVL 23

    Accepted Solution

    The script would be:

    cd destinationDir
    tar -xf /path/to/tarfile.tar

    to list the contents of the archive:

    tar -l /path/to/tarfile.tar


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    I have been scripting applications way too long and can never remember how to create an ISS file.  So I decided to write this article to act as my own knowledge base for future reference, and hope you will also benefit. An ISS file is a response …
    Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    875 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now