Write to pipe file hangs (using echo command)
HI,
I am a newbie to Linux and am trying to create a pipe file with the below command: mkfifo pone Now I am trying to write data to the file with the following command on the command prompt: echo asdadsasdasdasdasdasd >./pone But after i enter this command- the screen hangs up and doesnt proceed ahead. Same thing happened when I tried writing using: gedit pone Can anyone help me resolve this issue? |
is there any other process reading that pipe?
|
Quote:
I am using a virtual machine and have just opened a terminal and typed these commands. |
in that case most probably the buffer of that fifo is full. You need to read the content by for example cat pone in another terminal.
|
Quote:
The screen just hangs until i do a Ctrl+C |
yes, sure, cat pone will wait for input. You need to open another terminal and write into the pipe (that is the echo command you posted)
|
Quote:
THough - since I am a newbie i am not sure what exactly is it that you made me do :-| I will search online for the command 'cat' and figure that out. Thanks a ton! -Vani |
you can also check the man page of cat, man page of mkfifo and https://en.wikipedia.org/wiki/FIFO_2...electronics%29 and https://en.wikipedia.org/wiki/Named_pipe (and of course you can find more useful info too)
|
All times are GMT -5. The time now is 12:40 PM. |