answersLogoWhite

0

What are pipes in Linux?

Updated: 10/3/2023
User Avatar

Wiki User

15y ago

Best Answer

The pipe construct as symbolized by '|' originated in the Unix operating system and is one of a set of input/output (I/O) redirectors, the others being '>' and '<' (without the single quotes). This concept was also carried over to Microsoft's DOS and Windows operating system command lines (COMMAND.COM, CMD.EXE and today, Powershell). The general idea is that command line programs either take in "input" or send "output" to some destination, usually your screen which is considered "standard out" (abbreviated as stdio). Your keyboard is typically "standard in" (abbreviated as stdin). Using the pipe in operating systems the support the concept, it is possible to have the output of one program (it's stdout) "piped" to the input of another program (the other program's stdin) for further processing.

For example, if you run a command line program that outputs multiple lines of text that scroll out of view and you're specifically looking for a particular word (known as a "character string" or "string"), you can run your command and then pipe it's output to the input of the 'grep' command which will only display any output that matches your string. The command would look something like this:

mycommand | grep "sausages"

The stdout of 'mycommand' is piped to the stdin of 'grep'. The end result is that the only lines that will be displayed on your screen from 'mycommand' are the ones that contain the string "sausages".

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

pipe is a very useful Linux feature which enable different processes to communicate.

One of the fundamental features that makes Linux and other Unixes useful is the "pipe".

Pipes allow separate processes to communicate without having been designed explicitly to work together.

This allows tools quite narrow in their function to be combined in complex ways.

A simple example of using a pipe is the command: ls | grep x

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are pipes in Linux?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the importance of a pipe in Linux?

Pipes are useful for redirecting inputs or outputs from a program instead of using stdin or stdout. For instance, piping the output of a command to a text file.


What is Linux Internals?

Linux Internals is a book about how Linux works.


What is the Linux world?

Linux World is the Linux Development &amp; Training Center


What kind of courses are available in linux And what are the papers in Linux?

The courses available for Linux include Linux server, Linux desktop, bash shell, and many others.


Where can one obtain the latest Linux news?

One can obtain the latest Linux news on websites such as CRN, Linux Today or Distro Watch. One can also find news about Linux on Arch Linux and Linux Journal.


Does Linux use the kernel of Unix?

No, it is unix-based but Linux is a kernel not an operating system.Ubuntu,Linux Mint,Debian,and puppy Linux,ect. are OS's that use the Linux kernel.


Mandriva is Linux or unix?

linux


What is Linux's manufacturer?

Linux does not have a &quot;manufacturer.&quot; Linux development is guided by the Linux Foundation and Linus Torvalds, with contributions from thousands of companies and individuals.


Is there a Linux wiki?

There are lots of Linux-oriented wikis. There is no official wiki for the Linux kernel.


Is UNIX based on Linux?

No, but Linux is based on Unix since Linux is a Unix clone.


What was the first Linux application?

I think it was the Linux kernel. There are many used with Linux now.


What is the ID of a Linux extended partition?

82 =&gt; Linux swap / Solaris 83 =&gt; Linux ext2 &amp; ext3 85 =&gt; Linux Extended partition