Each command that we find in the linux operating system by default will do one job, and one job only.
Except that, it will do that one job very well.
What we can do with these command line tools is ‘connect’ them together like lego bricks in any way we want.
This is where the power of linux can be seen.
How we ‘connect’ these commands together is known as piping. the pipe symbol is “|”. (don’t confuse this with a lowercase L or any other character).
So what we do is we pipe the output from one command, and use it as the input for our next command.
Another component of linux that we can use is the right-angle bracket “>”. By default, when we execute a command on the linux terminal, it will output the result of it’s command to the screen for you to see.
But when we want to create files, we can re-direct the output of a command with > followed by the name of a file.
Please note: if the file exists, then the file WILL be overwritten! Sometime’s we want this to happen, other times we don’t. We can also use a double right-angle bracket “>>” to APPEND to the file.
So in this instance, the file will not be over-written, but the result of the command will be added (appended) to the end of the existing file (if of course the file exists!).