1834461 Members
2863 Online
110067 Solutions
New Discussion

tar

 
SOLVED
Go to solution
Prathap_1
Advisor

tar

Hi
I am trying to read the contents of the tape into the file using the command tar -tvf /dev/rmt/1m > file1.txt. I want to retrive only the date and the location and name of the file. But it is giving me the date and file name with bytes and junk stuff. Can anyone help me out in this.

Thanks
Prathap.
1 REPLY 1
Patrick Wallek
Honored Contributor
Solution

Re: tar

The other stuff is not junk, it is just the normal output from what you are doing.

To get just the date and the filename you'll have to do something like:

# tar -tvf /dev/rmt/1m | awk '{ print $4, $5, $6, $7, $8 }' > file1.txt