Results 1 to 2 of 2

Thread: How to extract a specific file from the archive to a specific location?

  1. #1
    Join Date
    Mar 2013
    Beans
    15

    How to extract a specific file from the archive to a specific location?

    I am trying to extract a file using this command in the open_data folder:

    Code:
    tar  xvf  archive1.tar  ./rayinvr/tramp/amp.f  -C  ./open_data/
    but it always extract the file back in the home folder.

  2. #2
    Join Date
    Mar 2008
    Location
    Missouri, USA
    Beans
    93
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: How to extract a specific file from the archive to a specific location?

    From the folks at StackOverflow: http://stackoverflow.com/questions/9...rent-directory


    The problem is that your arguments are in incorrect order. The single file argument must be last.

    E.g.

    $ tar xvf test.tar -C anotherDirectory/ testfile1

    should do the trick.
    ...
    The thread was closed at that answer, but I can't say I have tried it.
    Hope it works for you.
    Ubuntu 13.04 (Raring Ringtail)

Bookmarks

Posting Permissions

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