08-03-2011
Extracting one file, even if it's the first file, still runs through the whole tar file (in case there are multiple copies of that file in the tar). I suppose I could do that in the background, compare the sizes of the original and extracted file, and if/when they are the same, terminate the background process. Kind of messy...
There must be some way to do the listing, get the first entry, and then terminate the listing. I just can't come up with the right combination of pipes/coprocesses/etc... I figured somebody would know how to do this.
Thanks.
Don
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Howdy,
I'm trying to tar some directories to tape and then extract them from tape on another machine. I was hoping someone could help me with the syntax of the tar commands. Both machines are running Solaris 8.
Need to get all files and directories under the following:
... (6 Replies)
Discussion started by: pmetal
6 Replies
2. Filesystems, Disks and Memory
Hi,
The scenario is as follow:
Backup was done using:
tar cvf /dev/rmt/0mn file1.ext
tar cvf /dev/rmt/0mn file2.ext
tar cvf /dev/rmt/0mn file3.ext
tar cvf /dev/rmt/0mn file4.ext
tar cvf /dev/rmt/0mn file5.ext
When I do; tar tvf /dev/rmt/0m,
it only gives me the first file on the... (1 Reply)
Discussion started by: kong
1 Replies
3. UNIX for Advanced & Expert Users
I tried to buckup some oracle archive logs (from a solaris machine) to a remote tape (in a HP-UX machine).
I added the solaris machine name and user to .rhosts, and i tried to use this commande :
tar cvf HPhost:/dev/rmt/0mn /u01/*
The probleme that it gives:
HPhost:/dev/rmt/0mn : No such... (1 Reply)
Discussion started by: lasgaa
1 Replies
4. Filesystems, Disks and Memory
Hi all!
I'm new in this forum. I need to ask a few question.
I would like to know if it is possible to use dump and tar command for backup in one tape.
If it is possible, how do I restore it back?
Fyi, I'm using the Digital Unix 4.0E OSF/1 box. (old box) :-)
Thank you. :) (0 Replies)
Discussion started by: apokobondo
0 Replies
5. UNIX for Advanced & Expert Users
Trying to answer a question about whether tar table-of-contents is a good tool for verifying tape data. (1 Reply)
Discussion started by: tjlst15
1 Replies
6. UNIX for Advanced & Expert Users
Hi,
I have tar: tape blocksize error when launching
# gunzip < TierDB.tar.gz |tar -xvf /data/ora/DREC
tar: tape blocksize error
Can you please help me ? It is urgent.
Many thanks. (1 Reply)
Discussion started by: big123456
1 Replies
7. UNIX for Dummies Questions & Answers
Hi Guy`s I`m a newbie to Unix and I`m starting to love it
I got stuck donig backups of tar files to tape
I use this to find all tar files
find . -name '*.tar.*' > output
in output there would be n of file eg. 6
the size output is 156 but tar files are:
9.3M Jul 18 09:48... (1 Reply)
Discussion started by: donovan
1 Replies
8. UNIX for Advanced & Expert Users
Hello,
This might be a dumb question, but I havent been able to find the answer anywhere.
I currently have a backup script that uses 'tar' to backup some files to tape. I need to add a directory to the backup script, but I want to use 'vdump' to back it up to tape.
So my question is can I... (3 Replies)
Discussion started by: xadamz23
3 Replies
9. Solaris
Hi,
I am trying to determine if a tape is full because on 2 different tapes, im receiving 2 different kind of errors:
# uname
SunOS
# /bin/tar cvf /dev/rmt/0n /export/home
a /export/home/jerry/wlserver_10.0.tar.gz 28528 tape blocks
tar: write error: unexpected EOF
# mt -f /dev/rmt/0n... (5 Replies)
Discussion started by: mosies
5 Replies
10. Solaris
I've a tape contains a corrupt tar file. I'm using Unix SunOS 5.5.1. So when I run this command : dd if=/dev/rmt/0 of=/tmp/outputfile.tar
I get this error message :
warning /pci@1f, 0/pci@1/pci@1/sunw, isptwo@4/st@4,0 (sty): Error for command : read Error Level: Fatal Requested... (2 Replies)
Discussion started by: akaderb
2 Replies
LEARN ABOUT SUSE
sendfiles
SENDFILES(1) [nmh-1.5] SENDFILES(1)
NAME
sendfiles - send multiple files via a MIME message
SYNOPSIS
sendfiles [delay] mailpath subject file1 [file2 ...]
DESCRIPTION
The shell script sendfiles, is used to send a collection of files and directories via electronic mail.
sendfiles mailpath "subject" files ...
sendfiles will archive the files and directories you name with the tar command, and then mail the compressed archive to the "mailpath" with
the given "subject". The archive will be automatically split up into as many messages as necessary in order to get past most mailers.
Sometimes you want sendfiles to pause after posting a partial message. This is usually the case when you are running sendmail and expect
to generate a lot of partial messages. If the first argument given to sendfiles starts with a dash, then it is interpreted as the number
of seconds to pause in between postings, e.g.,
sendfiles -30 mailpath "subject" files ...
will pause 30 seconds in between each posting.
Extracting the Received Files
When these messages are received, invoke mhstore once for the list of messages. The default is for mhstore to store the combined parts as
a new message in the current folder, although this can be changed using storage formatting strings. You can then use mhlist to find out
what's inside; possibly followed by mhstore again to write the archive to a file where you can subsequently uncompress and untar it. For
instance:
% mhlist 5-8
msg part type/subtype size description
5 message/partial 47K part 1 of 4
6 message/partial 47K part 2 of 4
7 message/partial 47K part 3 of 4
8 message/partial 18K part 4 of 4
% mhstore 5-8
reassembling partials 5,6,7,8 to folder inbox as message 9
% mhlist -verbose 9
msg part type/subtype size description
9 application/octet-stream 118K
(extract with uncompress | tar xvpf -)
type=tar
conversions=compress
% mhstore 9
% uncompress < 9.tar.Z | tar xvpf -
Alternately, by using the -auto switch, mhstore will automatically do the extraction for you:
% mhlist 5-8
msg part type/subtype size description
5 message/partial 47K part 1 of 4
6 message/partial 47K part 2 of 4
7 message/partial 47K part 3 of 4
8 message/partial 18K part 4 of 4
% mhstore 5-8
reassembling partials 5,6,7,8 to folder inbox as message 9
% mhlist -verbose 9
msg part type/subtype size description
9 application/octet-stream 118K
(extract with uncompress | tar xvpf -)
type=tar
conversions=compress
% mhstore -auto 9
-- tar listing appears here as files are extracted
As the second tar listing is generated, the files are extracted. A prudent user will never put -auto in the .mh_profile file. The correct
procedure is to first use mhlist to find out what will be extracted. Then mhstore can be invoked with -auto to perform the extraction.
FILES
$HOME/.mh_profile The user profile
PROFILE COMPONENTS
Path: To determine the user's nmh directory
Current-Folder: To find the default current folder
SEE ALSO
mhbuild(1), mhlist(1), mhshow(1), mhstore(1). Proposed Standard for Message Encapsulation (RFC-934)
DEFAULTS
`-noverbose'
CONTEXT
None
MH.6.8 11 June 2012 SENDFILES(1)