LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   mounting from stdin (https://www.linuxquestions.org/questions/linux-general-1/mounting-from-stdin-423358/)

slinky2004 03-09-2006 09:10 PM

mounting from stdin
 
i have this small, tar.gz'ed hard drive image and i want to mount it without unpacking the image file to my disk drive. i was thinking i could redirect the output of tar to standard output and then just pipe it to mount like this: "tar -xvzOf test.img.tar.gz|mount /mnt/hd" but it isn't working. i thought most linux programs, like mount or dd, looked to stdin if no input was specified. is there any way to make mount mount an image from stdin?

gilead 03-10-2006 01:55 PM

The stream you're sending to stdin gets sent and then stops so it's not there anymore. So yes, you can send the output of one command to the input of another, but you need more than that to mount it as a file system.

Unfortunately, telling you that doesn't get the job done - I don't think you can mount a tar.gz file.

slinky2004 03-10-2006 02:33 PM

thanks anyway, i guess i can always make use of my ramdisk.


All times are GMT -5. The time now is 07:50 PM.