Re: Error in tar command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08Apr2010 10:57, m.roth@xxxxxxxxx <m.roth@xxxxxxxxx> wrote:
| > Hi experts i have error on tar command when i hit  *tar -cvfM /dev/nst2*
| > *
| > /DATA*   command. it have to creat multiple volume tape cartridge  (IBM
| > 3592)
| > but it give
| >
| > *tar: M: Wrote only 0 of 10240 bytes
| > tar: Error is not recoverable: exiting now
| > *
| > Error  Date size is 3.07 TB
| 
| man tar.
| 
| Now, let's look at this... you're creating a tarfile named /dev/nst2* and
| you're putting into it * and /DATA*? And what's the * in front of the tar
| command?
| 
| What happens if you do
| $ tar -cvMf /dev/nst2 ./* /DATA*
| ?

I think he's just marking out the command with "*", as one might with
quotes. So he's really running:

  tar -cvfM /dev/nst2 /DATA

which is perfectly sane. _IF_ the -M option exists on his system.

It looks to me that his tar command is misparsing the command line
options and sucking the "M" into the "f" option, and trying to write to
it.

I would try just skipping the "M" altogether - tar is supposed to space
media automatically anyway, and just go:

  tar cvf /dev/nst2 /DATA

(Note: _no_ dash "-" in the command above.)

Also check the permissions on /dev/nst2 (uness you're root) and later
try:

  tar cvMf /dev/nst2 /DATA

It's quite possible that using the leading "-" in the tar options is
changing how its parsing them. It "real" tar you don't need or use the
dash, and "f" grabs the next command line word, regardless of what
follows it. But _with_ a dash perhaps your tar is switching into
conventional option parsing where text following the "f" is taken as its
argument (i.e., the "M", thus the error).

Cheers,
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

I put instant coffee in a microwave oven and almost went back in time.
        - Stephen Wright

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux