Sponsored Content
Top Forums Shell Programming and Scripting help transferring tar files from cdrom to hard drive Post 302296168 by cfajohnson on Tuesday 10th of March 2009 02:20:12 PM
Old 03-10-2009
Quote:
Originally Posted by hootdocta5
alright guys, this is a pretty noob question but I need a script that will take a tarred folder "Animals" from cd and copy and extract it to replace an existing folder on hard drive called "Animals". (to give us more variations for another program which we don't need to worry about here), take the original contents of the harddrive folder "Animals" and move to a temp folder that we create called "Animals_Temp".

Code:
mv Animals Animals_temp
tar xf /mnt/cdrom/Animals.tar ## adjust as necessary

Quote:
Then once we want to be able to press esc at any time to restore back to normal( basically replace "Animals" folder with the original files now located in the "Animals_Temp" folder).

Bind this command to your escape key:

Code:
mv -f Animals_temp Animals

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Can't open CDROM drive

Hi all, Thru the installation i get the message to insert oracle CD 2 into cdrom drive but does not come up. with eject cdrom i get the device is busy. what i have to do to open the cdrom drive and continue the installation? plz explain to complete the installation thanks grep (7 Replies)
Discussion started by: grep
7 Replies

2. UNIX for Dummies Questions & Answers

Trying to copy old hard drive to new hard drive.

:confused: ........I have a new hard drive and I need to copy ALL info from the old to the new. I would like to use the dd command. I know the command is as follows...... dd if=/dev/rdsk/c1t1d0s0 of=/dev/rdsk/???????? Where I have the question marks is the problem. How do I find out what the... (4 Replies)
Discussion started by: shorty
4 Replies

3. 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

4. Filesystems, Disks and Memory

The best partitioning schem for a 250GB Sata hard drive & a 75GB SCSI hard drive

Hi I have 2 75GB SCSI hard drives and 2 250GB SATA hard drives which are using RAID Level 1 respectively. I wana have both FTP and Apache installed on them as services. I'm wondering what's the best partitioning schem? I wana use FC3 as my OS, so, I thought I can use the 75GB hard drive as the /... (0 Replies)
Discussion started by: sirbijan
0 Replies

5. UNIX for Dummies Questions & Answers

Lost CDROM drive

I haven't used the cdrom (actually dvdrom) drive on my server in months. I put the dvd in the drive but can't see it. I did an: iostat -En but don't see anything that says cdrom or dvd, what could be the problem? Thanks! (1 Reply)
Discussion started by: FredSmith
1 Replies

6. UNIX for Dummies Questions & Answers

How to transfer files from UNIX to my own Hard drive storage?

I will leave the University I am working, but I need to backup and transfer my research data from UNIX system in our department to my own 750G Hard Drive Storage. But I am not familiar with UNIX. How to do this? Thank you. (5 Replies)
Discussion started by: fishwater00
5 Replies

7. Solaris

SF V210 CDROM drive auto eject!

Hi, When I insert a cd to CDROM drive in SF V210 Solaris 10 it took seconds then eject it auto! How can I solve this issue? Thanks Regards :) (8 Replies)
Discussion started by: HishamN
8 Replies

8. Solaris

Solaris 9 not recognizing CDROM drive

Hello, I've read many posts that offer tips on how to mount a CDROM but I haven't seen any on how to get the system to recognize the CDROM drive. I was transferring files from CDROM to the hard drive successfully. I entered the third CDROM and the system refused to automount it. I tried... (2 Replies)
Discussion started by: TrueSon
2 Replies

9. 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
SDL_CDOpen(3)							 SDL API Reference						     SDL_CDOpen(3)

NAME
SDL_CDOpen - Opens a CD-ROM drive for access. SYNOPSIS
#include "SDL.h" SDL_CD *SDL_CDOpen(int drive); DESCRIPTION
Opens a CD-ROM drive for access. It returns a SDL_CD structure on success, or NULL if the drive was invalid or busy. This newly opened CD- ROM becomes the default CD used when other CD functions are passed a NULL CD-ROM handle. Drives are numbered starting with 0. Drive 0 is the system default CD-ROM. EXAMPLES
SDL_CD *cdrom; int cur_track; int min, sec, frame; SDL_Init(SDL_INIT_CDROM); atexit(SDL_Quit); /* Check for CD drives */ if(!SDL_CDNumDrives()){ /* None found */ fprintf(stderr, "No CDROM devices available "); exit(-1); } /* Open the default drive */ cdrom=SDL_CDOpen(0); /* Did if open? Check if cdrom is NULL */ if(!cdrom){ fprintf(stderr, "Couldn't open drive: %s ", SDL_GetError()); exit(-1); } /* Print Volume info */ printf("Name: %s ", SDL_CDName(0)); printf("Tracks: %d ", cdrom->numtracks); for(cur_track=0;cur_track < cdrom->numtracks; cur_track++){ FRAMES_TO_MSF(cdrom->track[cur_track].length, &min, &sec, &frame); printf(" Track %d: Length %d:%d ", cur_track, min, sec); } SDL_CDClose(cdrom); SEE ALSO
SDL_CD, SDL_CDtrack, SDL_CDClose SDL
Tue 11 Sep 2001, 22:58 SDL_CDOpen(3)
All times are GMT -4. The time now is 04:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy