Linux Views 5

The Linux pipe

The Linux pipe image 1

 

A pipe connects input and output so that the result of the command in front is passed as input to the command behind it.

With output redirection, data is stored in the I/O buffer of an auxiliary storage medium such as a hard disk, and because it is then delivered to the redirected command, it is stored in the buffer and takes time to process. 

A pipe, on the other hand, runs several commands joined by pipes almost at the same time, and the data going in and out is processed through the pipe, so it is relatively faster.

You type a pipe by pressing \ + shift to get a  | 

Command example

If you only want to see the root entry in /etc/passwd, you can do it more conveniently with the cat and grep commands

The Linux pipe image 2
The Linux pipe image 3

※There is no limit to the number of commands you can join through a pipe.

Reactions

Comments 0

A nickname and a password are required. The same password edits or deletes the comment later. Comments appear after a review.

Comments appear after a review. The password is used again to edit or delete.