Find the answer to your Linux question:
Results 1 to 3 of 3

Thread: Tar commands

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Tar commands

    Hey all,

    Is there any way to extract a single file or directory from a .tgz archive? I've got a 15GB archive and people are complaining about a performance decrease when I untar the whole thing (and it takes a while). Any help would be appreciated.



  2. #2
    Just Joined!
    Join Date
    May 2004
    just list the file/directory after the untar command.

    for instance lets say we have an archive "website.tar.gz"
    and we just want the "public_html" folder

    tar -xzvf website.tar.gz public_html
    this will extract just the public_html directory.

    Hope this helps.

  3. #3
    No probs - thanks!

    I just got a bit confused with the leading slash and the directory structure inside the archive (about 12 directories deep, the file was!).

    Thanks again,


  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts