Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

removing directory structure from a TAR file

0 views
Skip to first unread message

Murray Stokely

unread,
Dec 16, 1996, 3:00:00 AM12/16/96
to

Is there any way to make a tar file just decompress into the
current directory, without any kind of directory structure at all?
I've searched all through the man pages and couldn't find anything..

Murray Stokely ( mur...@southeast.net )
http://www.cdrom.com/pub/artpacks

Mark Taylor

unread,
Dec 17, 1996, 3:00:00 AM12/17/96
to

I don't think there is.
If I wanted to do this I would probably untar into somewhere safe
(i.e. a place without existing subdirectories) and then run something
like

find . -type f -exec cp -pf '{}' . \;

or replace the second '.' with the name of the directory you wanted
to put them in if it wasn't the same one (in which case you could
discard the '-f').

I haven't checked the find command so there *may* be a mistake in
it. Disclaim.


-----------------------------------------------------------------------
| Mark Beauchamp Taylor - physicist trapped in a chemist's body. |
| mark....@bris.ac.uk http://zeus.bris.ac.uk/~chmbt/index.html |
| Department of Chemistry, University of Bristol, UK -------
-----------------------------------------------------| ... It's the future! |
------------------------

0 new messages