LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (https://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   Gentoo - Can't Extract Tar file (https://www.linuxquestions.org/questions/linux-distributions-5/gentoo-cant-extract-tar-file-114736/)

quintar_51 11-11-2003 06:25 AM

Gentoo - Can't Extract Tar file
 
Hello. I know there's isn't a gentoo forum here, but maybe someone can help me out. I also posted this question on the gentoo forums and got no anwers.

I'm trying to install it from their 'live cd'. It's pretty much building it from scratch. I am following a tutorial, but on one step I get an error.

On the cd, there's a .tar.bz2 file that is supposed to be extracted. The command for it is tar -xvjpf /mnt/cdrom/stages/stage1-*.tar.bz2

However, when I type that, I get tar: ./bin/sync: Cannot open: No such file or directory ./bin/true

This goes on for every directory it's searching for..

druuna 11-11-2003 06:30 AM

The * might be the problem. Command line expension is not one of tar's good points.

You could try this:

for THIS in `ls /mnt/cdrom/stages/stage1-*.tar.bz2`
do
tar -xvjpf $THIS
done

quintar_51 11-11-2003 06:38 AM

Thanks for the quick reply.

I tried typing tar -xvjpf with the full path and file name and I still got the same problem.

when I tried your suggestion, after typing for THIS in 'ls /mnt/cdrom/stages/stage1-*.tar.bz2; , I got a > . Then it didn't recognize any commands at all.

druuna 11-11-2003 07:23 AM

Quote:

Originally posted by quintar_51
Thanks for the quick reply.

I tried typing tar -xvjpf with the full path and file name and I still got the same problem.

Strange. Next are (obvious??) suggestions:

- Does your tar have bz2 support (try bunzip2 and then use tar to extract the results),
- Is the path correct (/mnt/cdrom/stages),
- Are the files named correct.

Quote:


when I tried your suggestion, after typing for THIS in 'ls /mnt/cdrom/stages/stage1-*.tar.bz2; , I got a > . Then it didn't recognize any commands at all.

Did you type the ` (single backquote) at the end of the first command??

$ for THIS in `ls /mnt/cdrom/stages/stage1-*.tar.bz2` <enter>
> do <enter>
> tar -xvjpf $THIS <enter>
> done <enter>

But I do not think this will solve your problem because you mention trying one file with the tar -xvjpf command and getting the same error.

quintar_51 11-11-2003 07:32 AM

I managed to fix it...

I copied the file from the cd to the hard drive and then extracted it.

I hate stupid things like that... especially when I'm following a tutorial. :study:

Anyways, thanks a lot for your help :D


All times are GMT -5. The time now is 03:31 PM.