Hello, my name is Typhoon.
And in this lecture of our course, you will learn about lot of things about Linux command line.
So let's get started.
When you work in the Windows, Mac OS and most other operating systems, you probably spend your time
running applications like web browsers, word processors, spreadsheets and games.
A typical application is packed with features everything that designers or their users will need.
So most applications are self-sufficient.
They don't rely on other applications, so you might copy and paste between applications from time to
time, but for the most part they are separate.
But the Linux command line is different.
Instead of big applications with tons of features, Linux supplies thousands of small commands with
very few features.
The command cat, for example.
Cat the for example, the print files on the screen.
That's about it.
So the less files, less here, less command lists, the file in a directory, MV renames files and
so on.
So each command has a simple, fairly well-defined purpose.
What if you need to do something more complicated?
Don't worry.
So Linux makes it easy to combine commands so their individual features work together as accomplish
your goal.
So this way of working yields a very different mindset about computing.
Instead of asking which application should I launch to achieve some results, the question becomes which
command should I combine?
In this lecture, you will learn about how to arrange and run commands in different combinations.
To do what you need to keep things simple.
I will introduce just six Linux commands and their most basic uses so you can focus on the more complex
and interesting part about that, combining them with a huge learning curve.
So it's a bit like learning to cook with six ingredients or learning carpentry with just a hammer and
saw.
So you will combine commands using pipes.
And here this is a pipe here in Linux.
So this is the Linux feature that connects the output of one command to the output of another.
So let me open my driver here.
Jiffy Yeah, Grommet NP here.
So.
It takes one here.
So if you have here.
Yeah.
Toggle painting.
Yeah.
If you have one here, for example, this is our one result.
If you make pipe between them like this, this will take here and put it here.
So.
We will example will be practical for daily use.
So while others are just toy examples to demonstrate an important feature.
So let's get started with input output and pipes in Linux here.
Uh, yes, actually.
How can we clear screen shift and home?
Yes, clear screen here.
So most linux commands read input from keyboard.
Write output to the screen or both.
So Linux has fancy names for the reading and writing.
For example.
STD in.
STD in here.
So this is actually not a comment, but just I want to talk.
About this.
So this STD in is standard input or standard in so this is a stream.
Of input that Linux reads from your keyboard.
So when you type any comments at the prompt, you are displaying data on STD in.
And we also have the STD out pronounced as the standard output or standard out.
So this is the stream of the output that Linux writes to your display.
So when you run the command, for example, to print file names, the result appears on STD out.
So now this comes the cool part here so you can connect the STD out of one command to the STD in of
another.
So the first command feeds the second.
So let's begin with the familiar LSL command here.
So LSL and been here, for example.
So as you can see here, the directory contains far more files.
For example, if you have directory contains the file more files than your display has lines.
So the output quickly scrolls off the screen here.
As you can see, it's a it's a shame that the LHS can't print the information on screen and full at
the time.
So pausing until you press a key to continue here so like this or for example, s m home oops, home.
And as you can see here, we got this.
So.
Asexual also used a less here for example my file and as you can see we don't have a my file so the
last command displays a file on a screenful at a time so you can connect this to your commands because
writes the stdout and less can read from the stdin.
So for example ls ls l here?
So let's clear?
Yeah.
LS l here bin And this is a pipe here, so use a pipe to send the output from L.
S to bin here.
So not like this here.
So use a pipe to send output from ls to the input of less here.
So in this case the less is going to be less.
And just add.
And as you can see here, we got an a screen here like this oops.
Here.
So it.
Yeah.
Here.
As you can see here.
So the combined command displays the directory contents one screenful at a time here.
So the vertical.
But here vertical path that we've written here.
Yes.
Uh, here, press return to quick here.
Or for example, let's lsl home like this.
And as you can see here, we've written like the output here.
Like this.
So first commands is stdout to the next command.
And so any command line containing pipe is called.
Pipeline.
So commands generally are not aware that they are part of a pipeline.
So unless believes it's writing to the display when the expected output has been redirected to less
here so and less believes it's reading from the keyboard when it's actually reading from the output
of a less.