The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
need couple of ksh tricks please JamesByars Shell Programming and Scripting 4 02-23-2008 11:07 AM
Set prompt, problems and tricks HybridLogic UNIX for Dummies Questions & Answers 6 09-26-2007 05:05 PM
Developer Tricks: VideoLAN VLC Media Player - Redmond Developer News iBot UNIX and Linux RSS News 0 06-17-2007 03:54 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-10-2006
Registered User
 

Join Date: Feb 2005
Posts: 44
Stumble this Post!
tar tricks

Hello there,

Is there anyway to make the tar utility print the contents of the files inside it (not list the files, but rather their contents) sequentially from the command line?

What I ultimately would like to do is to have a way of printing the contents of each file in the tar archive separately to the standard input of another program through a pipe:

i.e.

tar -something test.tar | file_reader
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 08-10-2006
Registered User
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 923
Stumble this Post!
use the man pages, man.
Code:
# man tar
TAR(1)                                tar                               TAR(1)



NAME
       tar - The GNU version of the tar archiving utility

SYNOPSIS
       tar <operation> [options]
<snip>
      -O, --to-stdout
              extract files to standard output
As for printing each file seperately, you can extract a specific file from a tar with
Code:
tar -xf file.tar path/in/archive/to/file
Reply With Quote
  #3 (permalink)  
Old 08-14-2006
Registered User
 

Join Date: Feb 2005
Posts: 44
Stumble this Post!
Thanks that helped.... maaan!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:08 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0