Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Sep 2003 13:41:44 +0200
From:      "Daan Vreeken [PA4DAN]" <Danovitsch@Vitsch.net>
To:        "Charles Howse" <chowse@charter.net>
Cc:        FreeBSD-questions@FreeBSD.org
Subject:   Re: Tar question
Message-ID:  <200309031341.44678.Danovitsch@Vitsch.net>
In-Reply-To: <003101c3720d$a43d54d0$04fea8c0@moe>
References:  <003101c3720d$a43d54d0$04fea8c0@moe>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 03 September 2003 13:22, Charles Howse wrote:
> I'm a little confused about the arguments for tar.
> I want to tar the contents of a directory and save that .tgz file for
> backup purposes.
>
> Problem is, when I copy larry.tgz to /disk2 and:
> Tar xvfz larry.tgz
> It creates the /disk2 file structure within /disk2.
>
> # cd
> # ls /disk2
> # freebsd larry (directories)
> # tar cvfz larry.tgz /disk2
> # cp larry.tgz /disk2
> # cd /disk2
> # tar xvfz larry.tgz
> # ls
> # freebsd larry disk2 (directories)
>
> How can I make tar not create the directory structure within the same
> directory?
> Does that make sense?

What about :
cd /disk2
tar -cvfz larry.tgz *

grtz,
Daan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309031341.44678.Danovitsch>