help transferring tar files from cdrom to hard drive | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

help transferring tar files from cdrom to hard drive

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-10-2009
hootdocta5 hootdocta5 is offline
Registered User
 
Join Date: Mar 2009
Last Activity: 6 April 2009, 8:56 AM EDT
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
help transferring tar files from cdrom to hard drive

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". 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). Thanks in advance for your help guys.
Sponsored Links
    #2  
Old 03-10-2009
cfajohnson's Avatar
cfajohnson cfajohnson is offline Forum Advisor  
Shell programmer, author
 
Join Date: Mar 2007
Last Activity: 18 June 2014, 3:49 PM EDT
Location: Toronto, Canada
Posts: 2,875
Thanks: 0
Thanked 110 Times in 102 Posts
Quote:
Originally Posted by hootdocta5 View Post
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

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to transfer files from UNIX to my own Hard drive storage? fishwater00 UNIX for Dummies Questions & Answers 5 01-10-2008 01:03 AM
The best partitioning schem for a 250GB Sata hard drive & a 75GB SCSI hard drive sirbijan Filesystems, Disks and Memory 0 04-05-2006 02:19 PM
How do copy certain files and directories from one hard drive to another? shorty UNIX for Dummies Questions & Answers 4 02-11-2006 07:26 PM
Trying to copy old hard drive to new hard drive. shorty UNIX for Dummies Questions & Answers 4 01-30-2006 04:47 PM
Can't open CDROM drive grep UNIX for Dummies Questions & Answers 7 12-10-2002 08:55 AM



All times are GMT -4. The time now is 08:55 AM.