Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Apr 2018 22:20:23 -0600
From:      Gary Aitken <>
To:        FreeBSD Mailing List <>
Subject:   tar xf foo -- how to restore symlink?
Message-ID:  <>

Next in thread | Raw E-Mail | Index | Archive | Help
I've got a tarball with an archived symlink and its contents.
The symlink points to another directory in the tarball, and the
tarball contains copies of the files in the symlinked directory.

A normal extract fails with the message:
$ tar -xf nufraw-0.41.tar.gz
nufraw-0.41/doc-pak: Can't replace existing directory with non-directory

What's the right way to deal with this?

How do I get tar to restore the symlink as a symlink?
   -k and --exclude allow tar to continue unpacking,
   but don't restore the symlink as such.

"man tar" doesn't seem to have what I want but I'm probably blind.



Want to link to this message? Use this URL: <>