Since you all know C++ anyway: Let's talk about file descriptors! I'm going to stay within the C subset for this one The API is in C anyway, so this changes very little printf instead of cout, includes are a little different It'll probably compile with C++ Unix-like systems use these to refer to multiple things: files standard i/o network sockets pipes special files (device nodes, etc) A bunch of kinda strange uses Family of functions to manipulate these: open read write close There are quite a few more Quick program that opens files and does something with them Reading from non-files: 0 - standard input 1 - standard output 2 - standard error End of file: ctrl+d enters an end of file character Stops terminals, etc Redirection, then: > (Warning: Overwrites files and does NOT ask if you're sure!) >> 2> 2>> < /dev/null as a target for redirection