![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Help with TAR
Hi,
I tarred some files off to a tape. I'm trying to restore them now. Am I missing a step? 1) I rewind the tape. 2) I did a tar -tvf and saw the file on the tape. 3) I do a tar -xvf <file_name> that was shown from the tar -tvf Is this all I need to do to restore the file? Just trying to make sure I have the command right before issuing it, the file is very very large. Thanks! |
|
||||
|
<filename> is the device you're restoring data from when you supply the 'f' switch. The default device is /dev/rmt/0 on sun, /dev/sa0 on OS X, and /dev/rmt0 on linux so if you remove the 'f' parameter, the command would extract from the default device and would look like:
tar vx [filename] If it's a different device tar xvf [device] [filename] Carl |
|
||||
|
Some more tar parameters
You may also want to pay attention to some other parameters of tar. You must include one of these actions:
x=Extract contents t=List contents c=Create Then there is the: v=verbose which echos the results to the standard output (screen) If if you specify: f=file If "f" is specified, the next parameter must be the device or file of the archive. If no "f" is specified, the default device ( sometimes specified in /etc/defaults/tar ) will be used. So tar -xvf <file> <path/files> or -cvf <file> <path/files> or tar -tvf <file> are the most common. You may also want to pay attention to the file attributes and how to handle duplicates and paths that do not exist. Each OS may have minor differences so read the man page for that OS. |
|
||||
|
RE: Help with TAR
I have a bunch of tar'red files on a tape.
I'm trying to restore them to disk. I've read the MAN pages and some googled sites, but I'm still confused: I run the tar -xvf /dev/rmt/2un <file_name> command and it restores the files. But, how do I know which tar file is next on the tape? If I do a tar -tvf, it is past the point on the tape of the file right? Is there any way to do a tar -tvf and then rewind JUST 1 TAR file back so that I can then restore it? Thanks! |
|
||||
|
I know what's on the tape, I just don't know the order of what's on the tape unfortunately
![]() When you say you take a pass through the tape "mapping" out what's on the tape, do you mean you just do repetitive tar -tvf commands? Thanks for the help! |
|
|||||
|
Quote:
![]() |
| Sponsored Links | ||
|
|