Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [fifo]

The tag has no usage guidance.

0
votes
0answers
47 views

how make multiple redirection with command and fifo

I need to write a bash script in a linux machine with the follow redirection. echo commands > cmd_receives_commands > fifo > awk_parser > tcp_socket I verified that for the "tcp_socket" ...
2
votes
1answer
40 views

Shell pipes - the order of things

Because netcat on my box doesn't support -e, The netcat man page gives me this workaround: $ rm -f /tmp/f; mkfifo /tmp/f $ cat /tmp/f | /bin/sh -i 2>&1 | nc -l 127.0.0.1 1234 > /tmp/f I ...
3
votes
2answers
518 views

How can I redirect sound to a FIFO file?

I have a program which uses FIFO files for interacting with the user. An audio call can be made directing the output of arecord to one of the program's FIFO files: arecord -r 48000 -c 1 -f S16_LE >...
1
vote
1answer
59 views

Why does du -sk fail to report the size of a fifo?

There is a concept in bash called process substitution. You can run a command and use the output as a file. e.g. $ cat -n <(seq 3|tac) 1 3 2 2 3 1 I am curious why the ...
0
votes
1answer
68 views

Create STD IN/OUT Buffer for a Program Running in a Screen Session

Environment Linux version 2.6 Screen version 4.03.01 I am running an application inside of a screen session. The program prints to STDOUT and reads from STDIN. What I would like to do: First, have ...
1
vote
0answers
828 views

ffmpeg: convert mjpeg fifo into mp4 stream - on the fly- to render in chromium

I have a mjpeg stream in a fifo (comes from gphoto2 --capture-movie) and I want to play that stream in chromium. To capture the mjpeg stream I use: gphoto2 --capture-movie --stdout> fifo.mjpg ...
0
votes
3answers
308 views

Special file that keeps only the last n lines

Is there a way to create special files under Linux that would keep only, say the 100 last written lines? I have a process filling a log file, and I'd like to regularly parse its 100 last lines. I ...
0
votes
1answer
175 views

XTerm buffers output when reading from fifo

I have an xterm window that I would like to continually display the output of a named pipe. However, there seems to be some buffering occurring, and I can't find where it is happening. I open two ...
0
votes
2answers
93 views

In Linux, how can I run a process that I can come back to later to give a command after detaching

I'm currently developing a server hosting app (mainly for myself / learning purposes) and everything works great and what not, I don't know how many of you are familiar with Counter-Strike in general, ...
0
votes
1answer
817 views

automatically start netcat on localhost and remote-host and keep it active

I found this answer by @jeremytrimble on Stack Overflow which explains how you can read a FIFO file over network. I wonder if it’s possible to start these netcat commands automatically, e.g. in a ...
7
votes
1answer
612 views

Multiple unix pipes not working

This first pipeline works fine (printing "c"): echo "a" | sed 's/a/b/' | sed 's/b/c/' This one does not do what I expect (nothing gets printed when I feed an "a" into my fifo ): mkfifo fifo; cat ...
3
votes
2answers
4k views

How to prevent terminating command to send EOF to named pipes?

The problem I faced is exactly this one: http://www.linuxmisc.com/4-linux/d7863c256bccbfb6.htm I want to be able to run a program which takes stdin, and write data to it whenever I feel like it. ...
1
vote
1answer
74 views

How to implement FIFO functionality in RAID HDD

Can anyone please advice me on how to implement a FIFO functionality on a RAID 0 HDD. I want the old files to be over written after the space of the HDD is zero, so that the RAID acts like an infinite ...
5
votes
3answers
437 views

Can bash consume the same fifo from two separate commands?

I have a huge data source that I'm filtering using some greps. Here's basically what I'm doing right now: #!/bin/bash param1='something' param2='another' param3='yep' echo $(avro-read /log/huge_data ...
2
votes
1answer
1k views

How to pipe the output of a linux command back into the predecesssing command

The linux command nc -l 8090 | (read METHOD URI PROTOCOL ; echo "method: $METHOD" ; echo "path: $URI" ; echo "prot: $PROTOCOL") listens to port 8090 and when I type something like http://127.0.0.1:...
6
votes
3answers
900 views

Read non-blocking from multiple fifos in parallel

I sometimes sit with a bunch of output fifos from programs that run in parallel. I would like to merge these fifos. The naïve solution is: cat fifo* > output But this requires the first fifo to ...
3
votes
2answers
1k views

Keeping bash open on a named pipe

I'm looking to send commands to a separate tmux pane from vim and I figured the easiest way was to mkfifo a named pipe /tmp/cmds and run bash < /tmp/cmds to listen for commands to run. I then do ...
2
votes
1answer
357 views

how to convert a script using pipelines to named pipes

I have a bash script that is using anonymous pipes to achieve: grabbing video from dv capture device writing to a file (using tee) piping it to ffmpeg2theora (converting to ogv/theora video) writing ...
0
votes
2answers
231 views

How can I determine on my system where process substitution creates FIFO files?

I'm writing a C++ application and need to work with process substitution in the Bash shell. I'm trying to find a way to validate the paths passed as arguments to my program, some of which point to ...
4
votes
1answer
3k views

How long do FIFOs (named pipes) stay “open” for?

For example, I have a script that writes the time to a pipe in /etc/pipe. It writes continuously in a while true loop. How long will the data in the pipe be available for reading? If I only decide to ...
4
votes
1answer
2k views

can't scp a named pipe

I am trying to encrypt a file on-the-fly, redirecting the output to a named pipe [fifo]. I SSH into my server and run the command: $ mcrypt -k key < file > named_pipe then from ...