Hey,
I'm trying to unpack certain files from a tar archive - I don't want to unpack all of the 1.2GB file, just a particular bunch of it.
I tried an obvious command:
tar xvf /u8/sp_archive/2005.tar *1274*
All files I want to extract have "1274" in the name; I want to extract every file that does.
This produced nothing. I started working with tvf to see if I can actually get the desired files base on my input. Here is what I came up with:
$ for file in `tar tvf /u8/sp_archive/2005.tar | grep 1274 | awk '{print $9}' | sed "s/\.\///" | head -5`
> do
> echo $file
> tar tvf /u8/sp_archive/2005.tar $file
> done
My output:
mu1274.Apr.gz
mu1274.Apr.log
mu1274.May.log
mu1274.Apr.sp_table.gz
mu1274.Apr.index.gz
That is, just the results of my echo command. The files are there and I know those are the filenames within the archive - but they don't seem to be getting unpacked (or processed as if they would be if I specified x instead of t. If I do, they don't get unpacked).
Any ideas?
AIX 4.3