<?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 Re: need syntax of tar command in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/need-syntax-of-tar-command/m-p/3542498#M17527</link>
    <description>&lt;BR /&gt;if you want to extract only one particular from a tar archive then this is the syntax&lt;BR /&gt;&lt;BR /&gt;tar -xvf tar-file.tar file-to-extract&lt;BR /&gt;&lt;BR /&gt;file-to-extract is the filename with full path in the same exact manner how it is stored in archive. eg: home/user1/test_123/test&lt;BR /&gt;&lt;BR /&gt;you can use wild cards for file-to-extract. eg: home/user1/test_123/*&lt;BR /&gt;&lt;BR /&gt;or you can have list of files to be extracted in to a single file and use that as referrence to extract&lt;BR /&gt;&lt;BR /&gt;eg:&lt;BR /&gt;file1 contains:&lt;BR /&gt;home/user1/test_123/test&lt;BR /&gt;home/user2/test/user&lt;BR /&gt;tmp/output&lt;BR /&gt;&lt;BR /&gt;to extract these files, you can use the tar&lt;BR /&gt;command: tar --files-from file1 -xvf tar-file.tar &lt;BR /&gt;&lt;BR /&gt;this will extract the specified files and store them relative to the current path, if you have not used absolute path referrence while creating the archive&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Gopi</description>
    <pubDate>Thu, 12 May 2005 01:12:08 GMT</pubDate>
    <dc:creator>Gopi Sekar</dc:creator>
    <dc:date>2005-05-12T01:12:08Z</dc:date>
    <item>
      <title>need syntax of tar command</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-syntax-of-tar-command/m-p/3542494#M17523</link>
      <description>I need to restore 4 files from a system backup tape written to with tar.   If I backed up to tape with the following command:&lt;BR /&gt;&lt;BR /&gt;tar -cvp . -X /usr/bin/backuproot.exclude --label="Root Backup created on `date&lt;BR /&gt;'+%d-%B-%Y'`" -f /dev/st0&lt;BR /&gt;&lt;BR /&gt;What is the syntax of the tar command that will restore a list of 4 filenames that I will put in a /tmp/filelist file?&lt;BR /&gt;&lt;BR /&gt;Do the full pathnames of the files I put in my /tmp/filelist file need a "/" in front?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 May 2005 11:49:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-syntax-of-tar-command/m-p/3542494#M17523</guid>
      <dc:creator>Debbie Fleith</dc:creator>
      <dc:date>2005-05-11T11:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: need syntax of tar command</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-syntax-of-tar-command/m-p/3542495#M17524</link>
      <description>tar xvf&lt;BR /&gt;&lt;BR /&gt;P option will preserve absolute paths&lt;BR /&gt;&lt;BR /&gt;F --file will let you retore one file from an archive and wildcards are accepted.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 11 May 2005 14:38:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-syntax-of-tar-command/m-p/3542495#M17524</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-05-11T14:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: need syntax of tar command</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-syntax-of-tar-command/m-p/3542496#M17525</link>
      <description>I want to restore several files to a new path in one command if possible, and not overwrite the actual files.   My tar command was executed from the / level.</description>
      <pubDate>Wed, 11 May 2005 14:42:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-syntax-of-tar-command/m-p/3542496#M17525</guid>
      <dc:creator>Debbie Fleith</dc:creator>
      <dc:date>2005-05-11T14:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: need syntax of tar command</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-syntax-of-tar-command/m-p/3542497#M17526</link>
      <description>I think it will take multiple files in the --file section.&lt;BR /&gt;&lt;BR /&gt;Try the command with a smaller tar archive against the /tmp filesystem. That way the experimentation won't harm anything important.&lt;BR /&gt;&lt;BR /&gt;Good Luck,&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 11 May 2005 15:26:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-syntax-of-tar-command/m-p/3542497#M17526</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-05-11T15:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: need syntax of tar command</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-syntax-of-tar-command/m-p/3542498#M17527</link>
      <description>&lt;BR /&gt;if you want to extract only one particular from a tar archive then this is the syntax&lt;BR /&gt;&lt;BR /&gt;tar -xvf tar-file.tar file-to-extract&lt;BR /&gt;&lt;BR /&gt;file-to-extract is the filename with full path in the same exact manner how it is stored in archive. eg: home/user1/test_123/test&lt;BR /&gt;&lt;BR /&gt;you can use wild cards for file-to-extract. eg: home/user1/test_123/*&lt;BR /&gt;&lt;BR /&gt;or you can have list of files to be extracted in to a single file and use that as referrence to extract&lt;BR /&gt;&lt;BR /&gt;eg:&lt;BR /&gt;file1 contains:&lt;BR /&gt;home/user1/test_123/test&lt;BR /&gt;home/user2/test/user&lt;BR /&gt;tmp/output&lt;BR /&gt;&lt;BR /&gt;to extract these files, you can use the tar&lt;BR /&gt;command: tar --files-from file1 -xvf tar-file.tar &lt;BR /&gt;&lt;BR /&gt;this will extract the specified files and store them relative to the current path, if you have not used absolute path referrence while creating the archive&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Gopi</description>
      <pubDate>Thu, 12 May 2005 01:12:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-syntax-of-tar-command/m-p/3542498#M17527</guid>
      <dc:creator>Gopi Sekar</dc:creator>
      <dc:date>2005-05-12T01:12:08Z</dc:date>
    </item>
  </channel>
</rss>

