Use the -O option to extract to standard output instead of to a file
.
Sadly, this works only if one is using GNU tar or an advanced tar. Since this is a .Z file, you might not have that available.
You'll also have to decompress. If using GNU tar, you can do:
Otherwise, you'll have to extract the file, cat it, and remove it. On Solaris, you can do:
The 'q' options quits as soon as the file has been extracted, closing the pipeline, thus allowing uncompress to stop as soon as possible. You can then make a script to do all this for you.
Last edited by otheus; 01-07-2009 at 09:46 AM..
Reason: orretion
hello
i wish to write the result of these below conditions in a file:
1. in a specific folder, i have many tar.gz files.
2. each tar.gz file contains ".dat" file in sub folders.
3. i wish to get the full path of these .dat files, if i find in it a specific word ("ERROR24").
4. all this... (6 Replies)
Hi
I have a few hundred files with extension .tar.Z. These files were archived (tar) and compressed (Z) on a UNIX system. I need to unzip them but not extract them. In other words they need to go to .tar extension. I would like to do this on my MAC or on a windows pc. I do not have a UNIX... (3 Replies)
Hello All,
Hope you are doing well!!!!!
I have a small code in the below format in xml file:
<UML:ModelElement.taggedValue>
<UML:TaggedValue tag="documentation" value="This sequence

HLD_EA_0001X
HLD_DOORS_002X"/>
<UML:TaggedValue tag="documentation" value="This... (11 Replies)
Hi All,
I have the file in this format
**** Results Data ****
Time or Step
1
2
20
0.000000000e+00 0s 0s 0s
1.024000000e+00 Us 0s 0s
1.100000000e+00 1s 0s 0s
1.100000001e+00 1s 0s 1s
2.024000000e+00 Us Us 1s
2.024000001e+00 ... (7 Replies)
Is anyone out there? I'm trying to run a script i wrote that extracts multiple .tar files in succession by pasting it into standard input. It does extract them all but I cant get it to stop looping and when I hit enter I get a tar command error like its still looking for files to extract.
ie;
... (2 Replies)
Hello, I'm working on a script to extract the contents of a file (in general, plain txt file with numbers, symbols, and letters) and output it into a .txt file. but it is kind of all over the place. It needs to not include duplicates and the content has to be readable. I jumped all over the place... (7 Replies)
Can I extract files from an archive file (tar), where the filename includes the full directory path, to a different directory?
For example the archive files may have a filename of
/SrcFiles/XXX/filename.dat
and I want to extract it to /SrcFiles/YYY/filename.dat. Since the archive file was... (1 Reply)
Can I extract files from an archive file (tar), where the filename includes the full directory path, to a different directory?
For example the archive files may have a filename of
/SrcFiles/XXX/filename.dat
and I want to extract it to /SrcFiles/YYY/filename.dat. Since the archive file... (1 Reply)
Dear experts
I have received a tar file containing several files with full path. Now I need to restore it in another system but when I want to extract files by using
tar -xvf tarfile
it wants to create all files with full paths again in new system in which I don't have enough previleges.
How... (4 Replies)