Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2002
    Posts
    24

    Lightbulb Unanswered: How to un tar a specific file with the same name but diff date?

    I have a big tar file name biggy.tar with 10000 files in it and there are 5 files with the same name as trick.txt with different date stamp on them.

    like:

    ... 434 May 3 16:55 2003 /ttt/reter/trick.txt
    ... 434 May 3 16:57 2003 /ttt/reter/trick.txt
    ... 434 Jan 1 12:44 2004 /ttt/reter/trick.txt



    How do I untar the trick.txt with the date May 3 16:57 ??

  2. #2
    Join Date
    Jan 2004
    Location
    Bordeaux, France
    Posts
    320
    There is no option to select a specific version of a file in an archive for extraction.
    When you extract the file, you got at final the last version of the file in the archive.

    Extract from man page :
    -x Extracts the files specified by one or more File parameters from the archive.
    If the File parameter refers to a directory, the tar command recursively
    extracts that directory from the archive. If you do not specify the File
    parameter, the tar command extracts all of the files from the archive. When an
    archive contains multiple copies of the same file, the last copy extracted
    overwrites all previously extracted copies.
    If the file being extracted does not
    already exist on the system, the file is created. If you have the proper
    permissions, the tar command restores all files and directories with the same
    owner and group IDs as they have on the tape. If you do not have the proper
    permissions, the files and directories are restored with your owner and group
    IDs. It is not possible to ask for any occurrence of a file other than the last.
    Jean-Pierre.

  3. #3
    Join Date
    Sep 2002
    Posts
    24

    Lightbulb

    It got to have a trick we can do this. I saw it somewhere but did not border to write it down or memorize it.

    does any one know to work around this?

Posting Permissions

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