10-06-2008
Ah ok. Then I suggest the people that store hundreds of such archives change it to write them all together in one archive to make your work a bit more comfortable, if that is an option.
Also maybe have a while loop for example counting up to 99999 and have it read the archives until an error occurs.
If there is a command to get a clue how many files are on the tape (tctl? mt?), use that number.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I am trying to write a bash shell script that does the following:
1.Finds all *.txt files within my directory of interest
2. reads each of the files (25 files) one by one (tab-delimited format and have the same data format)
3. skips the first 10 rows of the file
4. extracts and... (4 Replies)
Discussion started by: manishabh
4 Replies
2. Shell Programming and Scripting
hello,
I will would be grateful if anyone can help me reply to my post
extract multiple cloumns from multiple files; skip rows and include filenames; awk
Please see this thread.
Thanks
manishabh (0 Replies)
Discussion started by: manishabh
0 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I'm using AWK to try to extract data from multiple files (*.txt). The script should look for a flag that occurs at a specific position in each file and it should return the data to the right of that flag.
I should end up with one line for each file, each containing 3 columns:... (8 Replies)
Discussion started by: Liverpaul09
8 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I'd like to process multiple files. For example:
file1.txt
file2.txt
file3.txt
Each file contains several lines of data. I want to extract a piece of data and output it to a new file.
file1.txt ----> newfile1.txt
file2.txt ----> newfile2.txt
file3.txt ----> newfile3.txt
Here is... (3 Replies)
Discussion started by: Liverpaul09
3 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have a directory full of *.txt files. I would like to print the last line of every file to screen.
I know you can use FNR for printing the first line of each file, but how do I access the last line of each file?
This code doesn't work, it only prints the last line of the last file:BEGIN... (5 Replies)
Discussion started by: Liverpaul09
5 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I have 7 files, each containing 9 columns separated by space. I want to extract the 9th columns from every file and save in a new file. The columns must be pasted next to each other. And the title of each columns should be the name of the corresponding files! Since the 3rd column is... (1 Reply)
Discussion started by: Unilearn
1 Replies
7. UNIX for Dummies Questions & Answers
I am trying to extract common list of Organisms from different files
For example I took 3 files and showed expected result. In real I have more than 1000 files. I am aware about the useful use of awk and grep but unaware in depth so need guidance regarding it.
I want to use awk/ grep/ cut/... (7 Replies)
Discussion started by: macmath
7 Replies
8. Shell Programming and Scripting
I have this code
awk 'NR==FNR{a=$1;next} a' file1 file2
which does what I need it to do, but for only two files. I want to make it so that I can have multiple files (for example 30) and the code will return only the items that are in every single one of those files and ignore the ones... (7 Replies)
Discussion started by: castrojc
7 Replies
9. Shell Programming and Scripting
Hi,
I have directory with multiple files from which i need to extract portion of specif lines and insert it in a new file, the new file will contain a separate columns for each file data.
Example:
I need to extract Value_1 & Value_3 from all files and insert in output file as below:
... (2 Replies)
Discussion started by: belalr
2 Replies
10. Shell Programming and Scripting
I have lots of tapes where files got written to X amount of positions per tape.
Is there a way to restore all files on the tape regardless of position ID?
Right now to restore files in the first position I do
mt -f /dev/nst0 fsf 1
tar -xvf /dev/nst0
I'd really like if there was a... (3 Replies)
Discussion started by: whegra
3 Replies
LEARN ABOUT DEBIAN
read_tape
READ_TAPE(8) AFS Command Reference READ_TAPE(8)
NAME
read_tape - Reads volume dumps from a backup tape to a file
SYNOPSIS
read_tape -tape <tape device>
-restore <# of volumes to restore>
-skip <# of volumes to skip>
-file <filename> [-scan] [-noask] [-label]
[-vheaders] [-verbose] [-help]
DESCRIPTION
read_tape reads an OpenAFS backup tape and prompts for each dump file to save. This command does not require any OpenAFS infrastructure.
This command does not need an OpenAFS client or server to be available, which is not the case with the backup(8) command.
The dump files will be named for the Read/Write name of the volume restored. After saving each dump file, vos restore or restorevol can be
used to restore the volume into AFS and non-AFS space respectively.
read_tape reads the tape while skipping the specified number of volumes. After that, it restores the specified number of volumes.
read_tape doesn't rewind the tape so that it may be used multiple times in succession.
OPTIONS
-tape <tape device>
Specifies the tape device from which to restore.
-restore <# of volumes to restore>
Specifies the number of volumes to restore from tape.
-skip <# of volumes to skip>
Specifies the number of volumes to skip before starting the restore.
-file <filename>
Specifies an alternate name for the restored volume dump file rather than the default of the volume name.
-scan
Scans the tape.
-noask
Doesn't prompt for each volume.
-label
Displays the full dump label.
-vheaders
Displays the full volume headers.
-verbose
Produces on the standard output stream a detailed trace of the command's execution. If this argument is omitted, only warnings and
error messages appear.
-help
Prints the online help for this command. All other valid options are ignored.
EXAMPLES
The following command will read the third through fifth volumes from the tape device /dev/tape without prompting:
% read_tape -tape /dev/tape -skip 2 -restore 3 -noask
PRIVILEGE REQUIRED
The issuer must have access to read and write to the specified tape device.
SEE ALSO
backup(8), restorevol(1), vos_restore(1)
COPYRIGHT
Copyright 2007 Jason Edgecombe <jason@rampaginggeek.com>
This documentation is covered by the BSD License as written in the doc/LICENSE file. This man page was written by Jason Edgecombe for
OpenAFS.
OpenAFS 2012-03-26 READ_TAPE(8)