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
refile(1mh)															       refile(1mh)

Name
       refile - file message in other folders

Syntax
       refile [ msgs ] [ +folder ] [ options ]

Description
       Use  the  command to move the specified message from the current folder to another folder.  You can refile messages in more than one folder
       by giving multiple folder names as arguments.

       If you do not specify a message, the current message is refiled.  You can refile a message other than the current  message  by  giving  its
       number  as  a msgs argument.  You can also refile more than one message at a time by specifying more than one message number, or a range of
       message numbers, or a message sequence.	See for more information on sequences.

       The current folder remains the same unless the -src option is specified; in that case, the source folder becomes  current.   Normally,  the
       last message specified becomes the current message.  However, if the -link option is used, the current message is not changed.

       If  the	Previous-Sequence:  entry is set in the file, in addition to defining the named sequences from the source folder, will also define
       those sequences for the destination folders.  See for information concerning the previous sequence.

Options
       -draft	 Refiles the draft message, or the current message in your folder, if you have one set up.  You cannot give a msgs  argument  when
		 you use this option.

       -file filename
		 Moves	a  file into a folder.	This option takes a file from its directory and places it in the named folder, as the next message
		 in the folder.  The file must be formatted as a legal mail message.  This means that the message must	have  the  minimum  header
		 fields separated from the body of the message by a blank line or a line of dashes.

       -help	 Prints a list of the valid options to this command.

       -link
       -nolink	 Keeps	a copy of the message in the source folder.  Normally, removes the messages from the original folder when it refiles them.
		 The -link option keeps a copy in the original folder, as well as filing a copy in the new folder.

       -preserve
       -nopreserve
		 Preserves the number of a message in the new folder.  Normally, when a message is refiled in to another folder, it is set to  the
		 next  available number in that folder.  The -preserve option keeps the number of the message the same in the new folder as it had
		 been in the old.

		 You cannot have two messages with the same number in one folder, so you should use this option with care.

       -src +folder
		 Specifies the source folder to take messages from.  Normally, messages are refiled from the current folder into  another  folder.
		 However, you can take messages from a different folder by using the -src +folder option to specify the alternative source folder.

Examples
       The following example refiles messages 3 and 5 in the folder
       % refile 3 5 +records

       The next example files the current message into two folders:
       % refile +jones +map

       The next example takes message 13 in the current folder and refiles it in the folder.  The message remains in the current folder as well as
       appearing in the folder.
       % refile -link 13 +test

       The next example takes a message from the folder when it is not the current folder, and places it in the folder
       % refile 3 -src +test +outbox

Profile Components
       Path:		 To determine your Mail directory

       Folder-Protect:	 To set protections when creating a new folder
       rmmproc: 	 Program to delete the message

Files
       The user profile.

See Also
       folder(1mh), mark(1mh), mh_profile(5mh)

																       refile(1mh)
All times are GMT -4. The time now is 12:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy