Добавить
Уведомления

The Bourne Shell, Cat and File Descriptors

Hey guys, welcome back to the channel and this is the first video of our new course Linux internals, please subscribe to my channel so that I can bring you more exciting content every day Before we dive into Linux internals, in the first couple of video I am going to give you an overview of Linux shell, file descriptors and few basic commands which we will be using throughout the course, since some of you would be new to Linux and if you feel you are familiar with shell and basic commands, feel free to skip this. The Bourse Shell: Shell is probably the most important part of Unix systems, it is the interface between Userspace and the Kernel space. So you would use the shell to run all your commands and kernel would change them into system calls to achieve the desired results. When you run a Unix or Linux server, chances are you will not have access to GUI but only shell, so you could perform all the required actions like creating a file, printing content, updating files, etc using a shell. It is something like MS-DOS in windows if you remember. The default shell in Unix systems was the Bourne Shell, the same was replaced by an advanced version called Bourne-Again shell in Linux, simply called Bash and what you see on my screen is the same shell. As a user, you can also create a chain of commands to achieve some kind of automation small tasks, these chain of commands is called shell script, but we will have a separate section for shell scripting so let's skip it here. The cat command: Now let's talk about the cat, first, let's see the man page for cat command, if you are new to Linux, man command gives you documentation for any command you want. So basically what cat does is read from standard input and print the output on standard output In Linux/Unix, processes use IO streams to read and write data, an input stream can be anything like a file, a device like a pipe, which we will talk about when we talk about devices or shell Now I'm gonna run cat without any input you seel in this case, my shell is acting like standard input also called stdin and as well as standard output or stdout In the above case, my shell became the stream provider for the cat instead of a file. StandarOut is similar, you can send the output to file, a device or straight to the terminal Together stdin and stdout are called file descriptors, there is a third descriptor as well called standard error, but we are not going to talk about it yet. we'll what's the standard error in another video. I think this is it for this video guys, hope you liked the video, please subscribe to the channel, some really exciting stuff is coming up in this series so do watch do. Ciao https://www.patreon.com/awshandson https://amzn.to/2A9DVv1 https://amzn.to/3cEGVNf

12+
12 просмотров
Год назад
24 октября 2024 г.
12+
12 просмотров
Год назад
24 октября 2024 г.

Hey guys, welcome back to the channel and this is the first video of our new course Linux internals, please subscribe to my channel so that I can bring you more exciting content every day Before we dive into Linux internals, in the first couple of video I am going to give you an overview of Linux shell, file descriptors and few basic commands which we will be using throughout the course, since some of you would be new to Linux and if you feel you are familiar with shell and basic commands, feel free to skip this. The Bourse Shell: Shell is probably the most important part of Unix systems, it is the interface between Userspace and the Kernel space. So you would use the shell to run all your commands and kernel would change them into system calls to achieve the desired results. When you run a Unix or Linux server, chances are you will not have access to GUI but only shell, so you could perform all the required actions like creating a file, printing content, updating files, etc using a shell. It is something like MS-DOS in windows if you remember. The default shell in Unix systems was the Bourne Shell, the same was replaced by an advanced version called Bourne-Again shell in Linux, simply called Bash and what you see on my screen is the same shell. As a user, you can also create a chain of commands to achieve some kind of automation small tasks, these chain of commands is called shell script, but we will have a separate section for shell scripting so let's skip it here. The cat command: Now let's talk about the cat, first, let's see the man page for cat command, if you are new to Linux, man command gives you documentation for any command you want. So basically what cat does is read from standard input and print the output on standard output In Linux/Unix, processes use IO streams to read and write data, an input stream can be anything like a file, a device like a pipe, which we will talk about when we talk about devices or shell Now I'm gonna run cat without any input you seel in this case, my shell is acting like standard input also called stdin and as well as standard output or stdout In the above case, my shell became the stream provider for the cat instead of a file. StandarOut is similar, you can send the output to file, a device or straight to the terminal Together stdin and stdout are called file descriptors, there is a third descriptor as well called standard error, but we are not going to talk about it yet. we'll what's the standard error in another video. I think this is it for this video guys, hope you liked the video, please subscribe to the channel, some really exciting stuff is coming up in this series so do watch do. Ciao https://www.patreon.com/awshandson https://amzn.to/2A9DVv1 https://amzn.to/3cEGVNf

, чтобы оставлять комментарии