The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
3answers
55 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
51 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
50 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
226 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
453 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 ...
2
votes
1answer
1k 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 ...
1
vote
1answer
49 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
357 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
785 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 ...
5
votes
1answer
336 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
914 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
292 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
209 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 ...
3
votes
1answer
2k 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 ...
3
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 ...