On Tue, May 28, 2002 at 10:46:01PM -0400, Mitch Collinsworth wrote:
>
> On Wed, 29 May 2002, GIC MLs wrote:
>
> > # dd if=/dev/nrsa0 bs=32k skip=1 | /usr/local/bin/gtar -xf usr.dump
> >
> > ... but I get:
> >
> > /usr/local/bin/gtar: usr.dump: Cannot open: (null)
> > /usr/local/bin/gtar: Error is not recoverable: exiting now
> >
> > What am I doing wrong here? Am I using the gtar command incorrectly?
> > I read through the tar manpage trying to find my mistake, but can't seem to
> > see what I'm doing wrong.
>
> Yeah, it's right here in the SYNOPSIS section of the man page:
>
> Ok, see it now? (Neither do I :-) But you need a - after the -xf,
Yeah, it is :))
> SYNOPSIS
> tar [ - ] A --catenate --concatenate | c --create | d
> --diff --compare | r --append | t --list | u --update | x
> -extract --get [ --atime-preserve ] [ -b, --block-size N ]
> [ -B, --read-full-blocks ] [ -C, --directory DIR ] [
> --checkpoint ] [ -f, --file [HOSTNAME:]F ] [ --force-
^^^^^^^^^^^^^^^^^^^^^^^
The gtar options being used are -x and -f (-xf).
The -f option, aka --file, takes a required argument "F" (required
is noted by the absence of [...] with an optional ([...] present)
prefix of "HOSTNAME:". I'm sure the required argument "F" is explained
later as the name of the tarball file. There is no tarball file, the
data is coming from standard input (the pipe). But the argument F is
still required.
It is a common unix convention to use "-" as a file name placeholder
meaning "standard input". For example: "ls | cat foo - bar" puts
the ls output between the contents of the files foo and bar.
--
Jon H. LaBadie [EMAIL PROTECTED]
JG Computing
4455 Province Line Road (609) 252-0159
Princeton, NJ 08540-4322 (609) 683-7220 (fax)