Similarly, you can search for “B00C2EGNSA” on any Amazon site, or just go to http://www.amazon.COUNTRY/dp/B00C2EGNSA (where “COUNTRY” is .fr, .de, etc) for your local equivalent.
Entitled “Lazy Linux: 10 essential tricks for admins“, this is a pretty good set of essential commands for *nix administrators.
If I have to suggest anything for in-depth study, it’s “Trick 6”: “Remote VNC session through an SSH tunnel”, because you can actually do just about anything through an SSH tunnel. If you’re faced with you -> firewall -> internet -> remotemachine -> internet -> restoftheworld, you can do whatever you like with “restof theworld” if you can ssh to “remotemachine”, whatever the local firewall thinks. And you can probably ssh over port 443 through the firewall. Hmm; maybe I should write this up properly at some point. I’m sure it’s well documented on the web if you look for it….
The previous post dealt with pipes, though the example may not have been the best for those who are not accustomed to the concept.
There are a few concepts to be understood – mainly, that of two (or more) processes operating together, how they put their data out, and how the get their data in. UNIX deals with multiple processes, all running (conceptually, at least) at the same time, on different CPUs, each with a standard input (stdin), and standard output (stdout). Pipes connect one process’s stdout to another’s stdin.
What do we want to pipe? Let’s say we’ve got a small 80×25 terminal screen, and lots of files. The
ls command will spew out tons of data, faster than we can read it. There’s a handy utility called “
more“, which will show a screen-worth of text, then prompt “more”. When you hit the space bar, it will scroll down a screen. You can hit ENTER to scroll one line.
I’m sure that you’ve worked this out already, but here is how we combine these two commands:
$ ls | more
<the first screenful of files is shown>
What happens here, is that the “more” command is started up first, then the “ls” command. The output of “ls” is piped to the input of “more”, so it can read the data.
Most such tools can also work another way, too:
$ more myfile.txt
<the first screenful of "myfile.txt" is shown>
That is to say, “myfile.txt” is taken as standard input (stdin).