<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Untarring multiple specific files in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/untarring-multiple-specific-files/m-p/3194284#M791952</link>
    <description>Hi there, &lt;BR /&gt;&lt;BR /&gt;If I want to untar multiple files that have a specific extension, but at the same time not untar all files with that extension, will the following work?&lt;BR /&gt;&lt;BR /&gt;1. cd dir/to/tar&lt;BR /&gt;2. ls -1 &amp;gt;&amp;gt; ../filename&lt;BR /&gt;3. vi ../filename (Once there, remove all files that are not to be unarchived.)&lt;BR /&gt;4. sh -c 'tar cvf /path/to/tarfile $(cat ../filelist)'</description>
    <pubDate>Tue, 17 Feb 2004 11:15:04 GMT</pubDate>
    <dc:creator>Andrew Kaplan</dc:creator>
    <dc:date>2004-02-17T11:15:04Z</dc:date>
    <item>
      <title>Untarring multiple specific files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/untarring-multiple-specific-files/m-p/3194284#M791952</link>
      <description>Hi there, &lt;BR /&gt;&lt;BR /&gt;If I want to untar multiple files that have a specific extension, but at the same time not untar all files with that extension, will the following work?&lt;BR /&gt;&lt;BR /&gt;1. cd dir/to/tar&lt;BR /&gt;2. ls -1 &amp;gt;&amp;gt; ../filename&lt;BR /&gt;3. vi ../filename (Once there, remove all files that are not to be unarchived.)&lt;BR /&gt;4. sh -c 'tar cvf /path/to/tarfile $(cat ../filelist)'</description>
      <pubDate>Tue, 17 Feb 2004 11:15:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/untarring-multiple-specific-files/m-p/3194284#M791952</guid>
      <dc:creator>Andrew Kaplan</dc:creator>
      <dc:date>2004-02-17T11:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: Untarring multiple specific files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/untarring-multiple-specific-files/m-p/3194285#M791953</link>
      <description>Correction to the previous message...item 4 should read: sh -c 'tar xvf /path/to/tarfile $(cat ../filelist)'</description>
      <pubDate>Tue, 17 Feb 2004 11:20:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/untarring-multiple-specific-files/m-p/3194285#M791953</guid>
      <dc:creator>Andrew Kaplan</dc:creator>
      <dc:date>2004-02-17T11:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: Untarring multiple specific files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/untarring-multiple-specific-files/m-p/3194286#M791954</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;xvf is untar you would make a tar.&lt;BR /&gt;&lt;BR /&gt;What you show should work to make a tar of only the files or to untar only the files assuming they were backed up the same way&lt;BR /&gt;&lt;BR /&gt;tar -cvf tape /etc/profile&lt;BR /&gt;&lt;BR /&gt;then&lt;BR /&gt;&lt;BR /&gt;cd /etc&lt;BR /&gt;tar -xvf tape profile&lt;BR /&gt;&lt;BR /&gt;Wont work.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Fbackup is much more flexible for this with the graph file system.&lt;BR /&gt;&lt;BR /&gt;                Steve STeel</description>
      <pubDate>Tue, 17 Feb 2004 11:21:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/untarring-multiple-specific-files/m-p/3194286#M791954</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2004-02-17T11:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Untarring multiple specific files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/untarring-multiple-specific-files/m-p/3194287#M791955</link>
      <description>Hi Andrew,&lt;BR /&gt;&lt;BR /&gt;You need to know the exact path to *each* file as used to tar them to do this - for EX&lt;BR /&gt;./path/to/file.ext&lt;BR /&gt;./path2/to/file2.ext&lt;BR /&gt;file3.ext&lt;BR /&gt;./path3/file4.ext&lt;BR /&gt;/path4/file5.ext&lt;BR /&gt;are all different &amp;amp; would need to be in "filelist" exactly as they are in the tarball whether relative as 1,2 &amp;amp; 4 above - or absolute as 3 &amp;amp; 5 above.&lt;BR /&gt;&lt;BR /&gt;If they're all in the same dir, then what you propose will work - again with the caveat that the proper path be used.&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
      <pubDate>Tue, 17 Feb 2004 11:23:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/untarring-multiple-specific-files/m-p/3194287#M791955</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2004-02-17T11:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Untarring multiple specific files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/untarring-multiple-specific-files/m-p/3194288#M791956</link>
      <description>Hi,&lt;BR /&gt;if you have nothing against hard manual work, try this:&lt;BR /&gt;# tar -xwf &lt;YOUR_TAR_FILE&gt;&lt;BR /&gt;&lt;BR /&gt;the "w" option causes an interactive tar session in which you are asked to confirm restore for each file with either a "y" or "n". Slow but safe.&lt;BR /&gt; &lt;BR /&gt;regards,&lt;BR /&gt;John K.&lt;/YOUR_TAR_FILE&gt;</description>
      <pubDate>Tue, 17 Feb 2004 11:35:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/untarring-multiple-specific-files/m-p/3194288#M791956</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2004-02-17T11:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: Untarring multiple specific files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/untarring-multiple-specific-files/m-p/3194289#M791957</link>
      <description>They say that the GNU version of tar has an X flag which specifies that the matching argument to tar is the name of a file that lists files to exclude from the archive: &lt;BR /&gt;&lt;BR /&gt;tar xvfX tarfile.tar exlude-list-file&lt;BR /&gt;&lt;BR /&gt;Elena.</description>
      <pubDate>Tue, 17 Feb 2004 11:55:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/untarring-multiple-specific-files/m-p/3194289#M791957</guid>
      <dc:creator>Elena Leontieva</dc:creator>
      <dc:date>2004-02-17T11:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Untarring multiple specific files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/untarring-multiple-specific-files/m-p/3194290#M791958</link>
      <description>You could do it the way you have it layed out as long as the tar contains relative pathnames and the names you supply match precisely.&lt;BR /&gt; &lt;BR /&gt;The drawback to your method is you could exceede the maximum number of characters allowed for a command line.&lt;BR /&gt; &lt;BR /&gt;Check out the "pax" command. You can supply a list of filenames to it and it can restore the selected files from your tar archive.&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Tue, 17 Feb 2004 12:58:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/untarring-multiple-specific-files/m-p/3194290#M791958</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2004-02-17T12:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Untarring multiple specific files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/untarring-multiple-specific-files/m-p/3194291#M791959</link>
      <description>Here's my idea of "quick and dirty".&lt;BR /&gt;tar tvf /dev/yourdevice &amp;gt;&amp;gt;/tmp/filenames&lt;BR /&gt;&lt;BR /&gt;This extracts the filenames from the tape and puts them into the text file /tmp/filenames.&lt;BR /&gt;&lt;BR /&gt;Then edit the file with your favorite editor and remove any filenames you don't want. Lastly, use:&lt;BR /&gt;tar xvf /dev/yourdevice `cat /tmp/filenames`&lt;BR /&gt;&lt;BR /&gt;This should work for any version of tar.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Tue, 17 Feb 2004 13:21:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/untarring-multiple-specific-files/m-p/3194291#M791959</guid>
      <dc:creator>Chris Vail</dc:creator>
      <dc:date>2004-02-17T13:21:56Z</dc:date>
    </item>
  </channel>
</rss>

