[LUNI] Question about TAR...
Joe Frost
captinsano443 at yahoo.com
Sat Nov 2 15:10:02 CST 2002
--- gs-list <gs-list at glsrms.com> wrote:
> While traversing the irc.openprojects.net IRC server, I came across
> an
> interesting question of another user, and after spending a good
> twenty
> minutes on trying to figure it out, I can't seem to. Hopefully
> somebody
> here has an answer that does NOT include the RM and MV commands:
>
> Here's how the original question was posed:
>
> lets say in snafu.tar i have /mnt/foo/blah, i want to extract
> /mnt/foo/blah/* to /blah, cwd is /blah how do i do that?
>
> The way that I interpret this, explained in more detail:
>
> snafu.tar contains files which were in the directory path
> /mnt/foo/blah,
> and the filenames are:
> /mnt/foo/blah/bar1
> /mnt/foo/blah/bar2
> /mnt/foo/blah/bar3
> /mnt/foo/blah/bar4
> /mnt/foo/blah/bar5
>
> and I want to extract bar1 thru bar5 into /blah instead of making it
> come
> out as /blah/mnt/foo/blah/*
>
> Make sense? Need more clarification? HELP!
>
You can't do that with tar. Absolute paths are
absolute paths. Take a look into pax.
pax -r -s ,/mnt/foo/blah,/blah, -f snafu.tar
or something like that. Read the man page and play
Joe
__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/
More information about the luni
mailing list