The Tar Pipe (2010)
blog.extracheese.org
blog.extracheese.org
Shouldn't this be something closer to "stdin, stdout, and stderr are always initially fds 0, 1, and 2"? I thought that one could play some trickery to change this. (I'm not being intentionally snarky, and might be quite wrong.)
It's a fairly common idiom to close everything, open a handle to /dev/null, and duplicate it twice to get 0, 1, and 2 pointing at /dev/null.
The other thing is that hard-linked files are apparently handled differently: http://stackoverflow.com/questions/316078/interesting-usage-...
Once you got how useful piping is, you understand why you can do something as powerful as:
machineA: tar -cf - dir | gz | ncat -l -p 6789
machineB: ncat machineA 6789 | gunzip | tar -xf -
And here you go, a dir is sent compressed through network with the power of little tools and a good inter-communication.