- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to read all files on "tar" tape
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 02:44 AM
07-31-2003 02:44 AM
How to read all files on "tar" tape
If I want to know a list of files on tape how can I do?
I must rewind tape ad do a "tar tvf" for each file written using 0mn special file... but if I don't know the number of writes on tape how I could automatize a script that lists all files on tape?
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 02:50 AM
07-31-2003 02:50 AM
Re: How to read all files on "tar" tape
will show you the contents of the files written on the tar tape and redirect it to the file /tmp/tar.log. Or just do a grep for the file you want.
Kurt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 03:06 AM
07-31-2003 03:06 AM
Re: How to read all files on "tar" tape
Otherwise, tar tvf /dev/rmt/0mn will display an index to all the files for a single tar archive. Repeat the command using the 0mn (no rewind) to see additional archives.
tar is an archaic utility and should be used only for casual data interchange. tar does not handle large files and is unable to recover from media errors.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 04:45 AM
07-31-2003 04:45 AM
Re: How to read all files on "tar" tape
As the above has suggested tar tvf /dev/rmt/0mn. But I believe your question was also to find how many tape writes there were. use "mt" to do this
mt -fsf 1 -t /dev/rmt/0mn
This will forward the tape by 1 tar write, repeat 'till it cesses to work.
Regards
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 04:50 AM
07-31-2003 04:50 AM
Re: How to read all files on "tar" tape
Could You suggest me any idea to do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 05:30 AM
07-31-2003 05:30 AM
Re: How to read all files on "tar" tape
starting from a blank tape:
#for i in 1 2 3 4 5 6 7 8 9
>do
>tar cvf /dev/rmt/0mnb prova$i.txt
>done
a prova1.txt 4 blocks
a prova2.txt 4 blocks
a prova3.txt 4 blocks
a prova4.txt 4 blocks
a prova5.txt 4 blocks
a prova6.txt 4 blocks
a prova7.txt 4 blocks
a prova8.txt 4 blocks
a prova9.txt 4 blocks
#mt -f /dev/rmt/0mnb status
Drive: HP C1537A
Format: DDS-3 format
Status: [81112500] EOF online compression immediate-report-mode
File: 9
Block: -1
#mt -f /dev/rmt/0mnb bsf 1
#tar tvf /dev/rmt/0mnb
Tar: blocksize = 0; broken pipe?
Why i get this error?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 05:40 AM
07-31-2003 05:40 AM
Re: How to read all files on "tar" tape
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 05:53 AM
07-31-2003 05:53 AM
Re: How to read all files on "tar" tape
#mt -f /dev/rmt/0mnb bsf 1
#tar tvf /dev/rmt/0mnb
Tar: blocksize = 0; broken pipe?
#tar tvf /dev/rmt/0mnb
rw-r--r-- 0/3 1730 Jul 31 15:15 2003 prova9.txt
#mt -f /dev/rmt/0mnb bsf 2
#tar tvf /dev/rmt/0mnb
Tar: blocksize = 0; broken pipe?
#tar tvf /dev/rmt/0mnb
rw-r--r-- 0/3 1730 Jul 31 15:15 2003 prova8.txt
#tar tvf /dev/rmt/0mnb
Tar: blocksize = 0; broken pipe?
#tar tvf /dev/rmt/0mnb
rw-r--r-- 0/3 1730 Jul 31 15:15 2003 prova9.txt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2003 06:30 AM
07-31-2003 06:30 AM
Re: How to read all files on "tar" tape
from man mt:
Spacing operations (back or forward space file or record) leave the
tape positioned past the object being spaced to in the direction of
motion. That is, backspacing a file leaves the the tape positioned
before the file mark, forward spacing a file leaves the tape
positioned after the file mark. This is consistent with all classical
usage on tapes.
I think the problem is that when you move back the tape is positioned before the file marker (check this http://www.faqs.org/faqs/aix-faq/part2/section-1.html for file marker).
Try to rewind completely, move the tape forward and check if the error is eliminated.
Enrico.