Sponsored Content
Top Forums Shell Programming and Scripting Script that can Copy a Range of files from Tape to Hard disk Post 302131765 by msjazzie on Monday 13th of August 2007 03:47:10 PM
Old 08-13-2007
Error Script that can Copy a Range of files from Tape to Hard disk

Hi:

I am a trying to write a script using a loop i guess. What I need to do is write a script that can allow my users to load a tape and copy a range of files from a tape to the hard disk. By range I mean, I would like the users to pick a range of numbers like files 3 - 8 and the script will copy files 3 - 8 from the tape to the hard disk. Please help. I have succesfully allowed the users to pick 1 file but can't get this range to work. Thanks in advance. Oh by the way we are using Korn....

Please see attachement for the script...

I do not know how to do the loop..
Katia

Last edited by msjazzie; 08-13-2007 at 04:53 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to Copy Contents from CD to Hard disk

Hello all.. Iam New to Unix Environment. I need to copy .cpio file from CD to a Folder on Sun 5.8 Box. Can anyone give me the commands to execute this ?.. Thanks in advance Ron (4 Replies)
Discussion started by: vr76413
4 Replies

2. UNIX for Dummies Questions & Answers

How do copy certain files and directories from one hard drive to another?

I have two drives (scsi) mounted on one server and I need to copy certain files and directories from one drive to the other. Any suggestions :confused: (4 Replies)
Discussion started by: shorty
4 Replies

3. Programming

monitoring files copied onto hard disk

hi... i need pointers to books/website... 'm trytin to write a daemon that monitors files of particular type(eg. text or pdfs) copied onto the hard disk. the daemon should detect the above n write the file name (along with the absolute path) to a file. please DO NOT give me the code... (2 Replies)
Discussion started by: abhi_abhijith
2 Replies

4. SCO

Tape Status shows 2 Hard errors and 5 Underruns on new tape

when I do a tape status /dev/rStp0 I get the following on a new tape and I have tried several: Status : ready beginning-of-tape soft errors : 0 hard errors: 2 underruns: 5 My BackupEdge has stopped backing up my system because it asks for a new volume yet my total system data is under 20... (5 Replies)
Discussion started by: psytropic
5 Replies

5. UNIX for Advanced & Expert Users

How can i copy files by date last modifed range?

When I do a ls -lt I get a list of files by date modified from newest to oldest. I would like to be able to copy some files to another directory using a date last modified range (i.e. Apr 30 - May 13) How could I do this? Thanks, Joe (4 Replies)
Discussion started by: geauxsaints
4 Replies

6. SCO

Make a Copy Entire Hard Disk

Dear All, I have a standalone desktop with SCO Openserver V 5, this is used to control a machine with custom written software. The problem is that the machine manufacturer has closed shop (bankruptcy) and there is no support on software. As a precaution I would want to make a complete backup of... (3 Replies)
Discussion started by: iqbal_siddiqui
3 Replies

7. UNIX for Advanced & Expert Users

script to automatically mount external usb hard disk

hi all, I have a debian lenny 5.0 server without GNOME installed. the server is at a customer's premise. I want to backup data from the server to the external usb hard disk. the backup will start at e.g 01:00 everyday. the user will plug the drive before going home. also the user will... (1 Reply)
Discussion started by: coolatt
1 Replies

8. Linux

C++ Code to Access Linux Hard Disk Sectors (with a LoopBack Virtual Hard Disk)

Hi all, I'm kind of new to programming in Linux & c/c++. I'm currently writing a FileManager using Ubuntu Linux(10.10) for Learning Purposes. I've got started on this project by creating a loopback device to be used as my virtual hard disk. After creating the loop back hard disk and mounting it... (23 Replies)
Discussion started by: shen747
23 Replies

9. Shell Programming and Scripting

Copy files given a range of numbers

Hi, I have about 500 files in a directory. The filenames are numbered i.e. 1.dat, 2.dat, 3.dat,...,500.dat. I have 5 other empty directories where I have to copy the files in different range of numbers, for example, 1.dat to 300.dat in dir1, or 200.dat to 500.dat in dir2, another example... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

10. Shell Programming and Scripting

I want to copy all files of a said type on my external hard drive

My code is this, what I'm trying to accomplish is to make a list of all pdf documents in my computer and then copy all of those documents to my external hard drive in a directory mkdir /Volumes/Hardrive-1/allpdf echo "File Locations" > /Volumes/Hardrive-1/allpdf/FileLocations.txt mdfind pdf... (2 Replies)
Discussion started by: darpness
2 Replies
MT(1)							      General Commands Manual							     MT(1)

NAME
mt - magnetic tape control SYNOPSIS
mt [-f device] [count] DESCRIPTION
Mt is a user interface to the magnetic tape commands described in mtio(4). It allows one to space a tape forwards or backwards, write end of file markers, etc. With the -f option a tape device can be named, otherwise the environment variable TAPE is used if set, otherwise the default device /dev/nrst4 is assumed. Standard input is used if the tape name is a dash (-). The count argument is used to tell how many blocks or files to space or how many file markers to write. It may be a C-style decimal, octal or hexadecimal constant, by default "1". Command is the action to perform, it may be one of the following, or any unambiguous prefix (like st for status): eof, weof Write count end-of-file markers. fsf Forward space count file markers. fsr Forward space count records. (The size of a record depends on the tape, and may even be variable, depending on the size of the writes.) bsf Backwards space count files. The count may be zero to backspace to the start of the current file. (A tape device need not support backwards movement, or may be very slow doing it. Rewinding and forward spacing may be better.) bsr Backwards space count records. The tape is positioned after the last block of the previous file if you hit a filemark when spacing backwards. The block count is set to -1 to indicate that the driver has no idea where it is on the previous file. eom Forward space to the end of media. rewind Rewind the tape. offline, rewoffl Rewind and take offline. This may cause some drives to eject the tape. status Shows the status of the drive, the sense key of the last SCSI error, current file number, current record number, residual count if the last command that encountered end-of-file, and the current block size. retension Removes tape tension by winding and rewinding the tape completely. erase Erases the tape completely and rewinds it. density Sets the density code to read or write the tape to count. Density codes supported depend on the drive. This command need not be used if the drive senses the proper density on read and can only write one density. blksize, blocksize Sets the block size used to read or write the tape to count. This command may be used to select a fixed block size for a variable block size tape. This will speed up I/O for small block sizes. Use a zero count to use variable sized blocks again. ENVIRONMENT
TAPE Tape drive to use if set. FILES
/dev/nrst4 Default tape device. SEE ALSO
mtio(4), st(4). AUTHOR
Kees J. Bot (kjb@cs.vu.nl) MT(1)
All times are GMT -4. The time now is 12:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy