Subject: Re: tar: how does it work?
To: None <netbsd-users@netbsd.org>
From: Ralf Doering <rdoering@netsys-it.de>
List: netbsd-users
Date: 10/21/2005 12:15:07
Vittorio <vdemart1@tin.it> writes:

> In a script under freebsd I issued the following tar command 
> successfully while under netbsd it fails saying
>
> uffBSD# /bin/tar -cz 
> /etc > /pgdump/etc.5.tar.gz
> tar: Failed open to write on /dev/nrst0 

[...]

You have to use the -f switch, as you found out yourself already. But
this can be a little bit annoying, as you found out too ;)


> uffBSD# /bin/tar -cfz /pgdump/etc.5.tar.gz /etc/*
> tar: Removing leading 
> / from absolute path names in the archive
>
> But there's NOTHING inside 
> etc.t.tar.gz.

Order os parameters is essential in this case. Please try

/bin/tar czf /pgdump/etc.5.tar.gz /etc/*

This should work.

Ralf