Alter command to extract iso content , tar cf - . | (cd /tmp/testiso_temp; tar xfp -)
by andrewysk from LinuxQuestions.org on (#5G77P)
I have mounted an bootable iso image onto /mnt/testiso
Code:$df -H
/dev/loop12 17M 17M 0 100% /mnt/testiso
$pwd
/mnt/testiso
As you can see the content of the iso.
$ ls
boot boot.catalog efi.img mach_kernel System
$ tar cf - . | (cd /tmp/testiso_temp; tar xfp -)this is used to extract the content of the iso to a temporary folder (/tmp/testiso_temp).
Can you please explain to me how this tar with all those options extract the content of the mounted iso to a new file for me to modify ?
I tried to understand the tar options, but just can't get it.
Code:$ tar cf - /mnt/testiso/ | (cd /tmp/testiso_temp; tar xfp -)when i tried to change the code as above, the output of it is weird.. instead of it extract the files to /tmp/testiso_temp, it even move the whole /mnt/testiso to /tmp/testiso_temp...
why ?
I just want to alter the code so that i can insert iso path instead of have to be in the directory itself..
Thx
Thx


Code:$df -H
/dev/loop12 17M 17M 0 100% /mnt/testiso
$pwd
/mnt/testiso
As you can see the content of the iso.
$ ls
boot boot.catalog efi.img mach_kernel System
$ tar cf - . | (cd /tmp/testiso_temp; tar xfp -)this is used to extract the content of the iso to a temporary folder (/tmp/testiso_temp).
Can you please explain to me how this tar with all those options extract the content of the mounted iso to a new file for me to modify ?
I tried to understand the tar options, but just can't get it.
Code:$ tar cf - /mnt/testiso/ | (cd /tmp/testiso_temp; tar xfp -)when i tried to change the code as above, the output of it is weird.. instead of it extract the files to /tmp/testiso_temp, it even move the whole /mnt/testiso to /tmp/testiso_temp...
why ?
I just want to alter the code so that i can insert iso path instead of have to be in the directory itself..
Thx
Thx