Logo Background

TAR Extract File To Given Directory

  • By on November 4, 2009 | No Comments

    If you going to use the tar extract file command in Unix, there’s something you should know on the best way to extract out the file into preferred path.

    Let say you have a tarball name tar_extract_file.tar in the location of /restore and you would like to extract the tarball into the path /application/system.

    You don’t have to copy the whole tar_extract_file.tar into /application/system and run the tar -xvf command from there.

    Instead you can follow the steps as below to have a direct extract from the source to destination.

    $ cd  /application/system
     
    $ tar -xvf /restore/tar_extract_file.tar

    Remember to check what is the predicted extract output before you perform any extraction.

    You wouldn’t love to see the extraction to cause thousand files populated in your /application/system mount point.

    Previous
    Next
    » 502 Bad Gateway Error
Leave a Comment