vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| hello all, Good morning! I'm having a problem with tar extraction. I have a tar file that contains the following /abc/file1.txt /def/file2.txt and I want to extract the files but it doesn't allow me to since this would be extracting in the root directory and that directory hasn't been created yet. Is it possible to just extract the files? and put them in a separate directory override what is on the tar file? thanks! melissa |
| |||
| melissa_benkyo wrote: > Good morning! I'm having a problem with tar extraction. I have a tar > file that contains the following > > /abc/file1.txt > /def/file2.txt > > and I want to extract the files but it doesn't allow me to since this > would be extracting in the root directory and that directory hasn't > been created yet. Is it possible to just extract the files? and put > them in a separate directory override what is on the tar file? If nothing helps use GNU tar |
| |||
| melissa_benkyo wrote: > hello all, > > Good morning! I'm having a problem with tar extraction. I have a tar > file that contains the following > > /abc/file1.txt > /def/file2.txt > > and I want to extract the files but it doesn't allow me to since this > would be extracting in the root directory and that directory hasn't > been created yet. Is it possible to just extract the files? and put > them in a separate directory override what is on the tar file? > > thanks! > > melissa That is a common problem when the original tar file/tape was created incorrectly. What you have is a "rooted" tar that was created by specifying full paths to the files. It should have been created as a "unrooted" tar where the extraction could be local to your current directory. You can, as someone else mentioned, use gnu tar. They have a option for doing what you want to do. Or have a system administrator insert a couple of links in the root directory for you. Have them point to where you want the data to wind up. When your done, let them know and they can delete the links. -- Martin E. Meserve k7mem@myrealbox.com http://www.k7mem.150m.com |
| |||
| melissa_benkyo <wyl_lyf@yahoo.com> wrote: > hello all, > > Good morning! I'm having a problem with tar extraction. I have a tar > file that contains the following > > /abc/file1.txt > /def/file2.txt > > and I want to extract the files but it doesn't allow me to since this Use pax : pax -r -s'/^\///' -f myfile.tar This will restore the tar file into the current directory with any reading /'s removed, so /abc/file1.txt will become simply abc/file.txt Scott |
| ||||
| thanks everyone for the help. Scott Howard <scott@hunterlink.net.au> wrote in message news:<1090049147.153285@docbert>... > melissa_benkyo <wyl_lyf@yahoo.com> wrote: > > hello all, > > > > Good morning! I'm having a problem with tar extraction. I have a tar > > file that contains the following > > > > /abc/file1.txt > > /def/file2.txt > > > > and I want to extract the files but it doesn't allow me to since this > > Use pax : > pax -r -s'/^\///' -f myfile.tar > > This will restore the tar file into the current directory with any > reading /'s removed, so /abc/file1.txt will become simply abc/file.txt > > Scott |