Questions tagged [streams]
In computer networking, STREAMS is the native framework in Unix System V for implementing character devices.
34 questions
0 votes
2 answers
48 views
socat/netcat how to send a file and wait for server response?
I want to send a file to a TCP server, keep the TCP connection open, wait (couple of seconds) for the response, and send the response to stdout. I don't want the connection to be (half) closed ...
1 vote
1 answer
2k views
How to remove unneeded languages from video files using ffmpeg?
I have a number of video files (500+) with lots of audio and subtitle streams for languages that I don't need and would thus like to remove to conserve storage space. I tinkered around with ffmpeg, ...
1 vote
2 answers
115 views
Is there a program that concatenates non-seekable streams (size not known in advance) and can separate them again?
I'm trying to concatenate multiple input files/streams into one stream (using the imaginary command stream-cat), pipe that stream into ssh and on the remote host separate it back into individual files/...
14 votes
2 answers
2k views
Why is appending different streams to a file safe?
It's well known that redirecting standard output and error to the same file with cmd >out_err.txt 2>out_err.txt can lead to loss of data, as per the example below: work:/tmp$ touch file.txt work:...
0 votes
1 answer
1k views
Stream Audio over LAN, Linux -> Windows, Debian 8
Tried ping between computer's static IP's connected by router (General failure). Therefore UDP direct connection attempts went nowhere. Tried using ffplay and pulse to stream audio, but Debian 8 is ...
0 votes
1 answer
948 views
What would be the stream for file descriptor 3u?
I know that the stream for file descriptor 2u is stderr. However, I'm not sure what the stream for file descriptor 3u would be and why? Ultimately, what does 3u represent here?
3 votes
0 answers
3k views
How to receive "v4l2-ctl --stream-to-host" stream from a machine on the same LAN on said host for use with, e.g., video conferencing software?
There is an example that streams a webcam to another computer by piping a V4L2 stream into netcat (v4l2-ctl --stream-to - | nc <host> <port>), and this works, but it feels redundant when ...
1 vote
1 answer
60 views
What exactly is a single "atom" in a standard stream in linux?
Conceptually, a stream is a sequence of "characters" or "atoms", i.e. a binary stream is a sequence of 0s and 1s. But in Linux standard streams, if I write a bash script that asks &...
2 votes
2 answers
893 views
Are there "non-standard" streams in Linux/Unix?
The so-called "standard streams" in Linux are stdin, stdout, and stderr. They must be called "standard" for a reason. Are there non-standard streams? Are those non-standard streams ...
1 vote
1 answer
308 views
What would need to be changed to create a new standard stream?
Hopefully this question isn't too abstract, it touches on a bunch of software throughout the stack. We all know about /dev/stdin, /dev/stdout, and /dev/stderr. What if I wanted to create a new ...
1 vote
1 answer
97 views
bash I/O redirection - how to append to stderr
I have a script that loops over some big collection of data and performs some lenghty operations. Then i need to sort | uniq -c its output. So to let it know that its alive, I print a dot every N ...
1 vote
2 answers
2k views
Spawn a terminal and redirect its stdout to original process
I'm trying to spawn a new terminal, execute a few commands and pipe their output to stdin of the original process. A mwe of what I'm trying to do is the following bash one-liner: $ xterm -e sh -c &...
0 votes
1 answer
644 views
dd bs=X count=1 reads less than X bytes [duplicate]
I have dd from GNU coreutils 8.32. When I run { echo a; sleep 1; echo b; } | dd bs=4 count=1 then I get a 0+1 records in 0+1 records out 2 bytes copied, 2.0381e-05 s, 98.1 kB/s dd terminates during ...
1 vote
1 answer
287 views
/dev/fd inconsistency
What explains the following inconsistency in the reported contents of /dev/fd? erhannis@mnode6:/dev/fd$ ll /dev/fd/ total 0 dr-x------ 2 erhannis erhannis 0 Jan 12 22:10 . dr-xr-xr-x 9 erhannis ...
3 votes
1 answer
1k views
How to pipe all output streams to another process?
Take the following Bash script 3-output-writer.sh: echo A >&1 echo B >&2 echo C >&3 Of course when ran as . 3-output-writer.sh it gets the error 3: Bad file descriptor, because ...