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:

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-
       local   ] [ -F, --info-script F --new-volume-script F ]  [
       -G,  --incremental  ] [ -g, --listed-incremental F ] [ -h,
       --dereference ] [ -i, --ignore-zeros ] [ -I,  --bzip  ]  [
       --ignore-failed-read  ]  [  -k,  --keep-old-files  ] [ -K,
       --starting-file F  ]  [  -l,  --one-file-system  ]  [  -L,
       --tape-length  N  ]  [  -m,  --modification-time  ]  [ -M,
       --multi-volume ] [ -N, --after-date DATE, --newer DATE ] [
       -o,  --old-archive,  --portability ] [ -O, --to-stdout ] [
       -p, --same-permissions,  --preserve-permissions  ]  [  -P,
       --absolute-paths ] [ --preserve      ] [ -R, --record-num�
       ber ] [ --remove-files ] [ -s,  --same-order,  --preserve-
       order  ]  [ --same-owner ] [ -S, --sparse ] [ -T, --files-
       from F ] [ --null     ] [ --totals   ] [ -v, --verbose ] [
       -V,  --label  NAME  ]  [ --version  ] [ -w, --interactive,
       --confirmation ] [ -W, --verify    ] [ --exclude FILE ]  [
       -X, --exclude-from FILE ] [ -Z, --compress, --uncompress ]
       [ -z, --gzip,  --ungzip       ]  [  --use-compress-program
       PROG ] [ --block-compress ] [ -[0-7][lmh]     ]

       filename1 [ filename2, ... filenameN ]

       directory1 [ directory2, ...directoryN ]


Ok, see it now?  (Neither do I  :-)  But you need a - after the -xf,
otherwise tar is trying to read its input from usr.dump, which it can't
find.  a - after the -f option says to read from stdin.  So try changing
that to read:

# dd if=/dev/nrsa0 bs=32k skip=1 | /usr/local/bin/gtar -xf - usr.dump

and let us know how it goes.

-Mitch

Reply via email to