1829208 Members
3186 Online
109987 Solutions
New Discussion

extracting files

 
Waqar Razi
Regular Advisor

extracting files

How can I extract files to a specific directory from the file " sudo-1.6.9p17.tar.tar "?
8 REPLIES 8
Mel Burslan
Honored Contributor

Re: extracting files

did you try copying this tar file into the directory and running tar -xvf command while sitting in that directory ?
________________________________
UNIX because I majored in cryptology...
Mel Burslan
Honored Contributor

Re: extracting files

forgot to say this in my previous posting, tar -xvf command is dependent on how the tar file was created. If the contents of the tar file starts with slash, i.e., saved from an absolute path, it will try to extract this tar file into the same absolute path, and I don't know if you can do anything to prevent this.

One thing that comes to mind is to unpack the tar archive on a PC or another different machine and import the files to a location you wish them to reside.

hope this helps
________________________________
UNIX because I majored in cryptology...
Yashwant
Valued Contributor

Re: extracting files

tar -xvf tar_filename
Tim Nelson
Honored Contributor

Re: extracting files

post the output of tar vtf sudo-1.6.9p17.tar.tar

If there is no leading "/" then it was created relatively. cd to the directory you want then untar. ( you will get all the subdirs, no way around that ).


BTW, I believe sudo is available from software.hp.com as a SD depot. Then there is no need to untar.

Steven Schweda
Honored Contributor

Re: extracting files

Note that there's seldom a good reason for a
file to be named "X.tar.tar", which leads
one to wonder how you got one (or if you're
reporting the real file name). In any case,
the first step would be one of those
"tar t [...]" commands, to try to see what
you have there.
Torsten.
Acclaimed Contributor

Re: extracting files

I'm pretty sure the original name was

sudo-1.6.9p17.tar.gz

If you download such file with a browser on windows, the suggested name will turn

*.tar.gz

into

*.tar.tar

for any reason.

Try to rename it back to

sudo-1.6.9p17.tar.gz

and use "gunzip" to de-compress the file.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Torsten.
Acclaimed Contributor

Re: extracting files

Did you get the file from here?

http://www.sudo.ws/sudo/dist/sudo-1.6.9p17.tar.gz


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Dennis Handly
Acclaimed Contributor

Re: extracting files

>Mel: it will try to extract this tar file into the same absolute path, and I don't know if you can do anything to prevent this.

You toss tar in the garbage and use pax(1) -s instead. (GNU tar will also work.)