|
INTERVIEW QUESTIONS
OPERATING SYSTEMS
SOLARIS
DETAILS
Question: What is "Piping"?
Answer: piping:- sending the output of a command to the input of another is called piping.
some examples are:
$cal | wc
will output total line's,word's and character's
$cal | wc | wc
will output total line's,word's and character's
A unix pipe provides a one-way flow of data.
for example
For example, if a Unix users issues the command $who | sort |lpr then the Unix shell would create three processes with two pipes between them: A pipe can be explicitly created in Unix using the pipe system call. Two file descriptors are returned--fildes[0] and fildes[1], and they are both open for reading and writing. A read from fildes[0] accesses the data written to fildes[1] on a first-in-first-out (FIFO) basis and a read from fildes[1] accesses the data written to fildes[0] also on a FIFO basis.
When a pipe is used in a Unix command line, the first process is assumed to be writing to stdout and the second is assumed to be reading from stdin. So, it is common practice to assign the pipe write device descriptor to stdout in the first process and assign the pipe read device descriptor to stdin in the second process. This is elaborated below in the discussion of multiple command pipelines.
|
|
|
Category |
Solaris Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 9725 users |
Added on |
7/23/2011 |
Views |
69760 |
Rate it! |
|
|
Question:
What is "Piping"?
Answer:
piping:- sending the output of a command to the input of another is called piping.
some examples are:
$cal | wc
will output total line's,word's and character's
$cal | wc | wc
will output total line's,word's and character's
A unix pipe provides a one-way flow of data.
for example
For example, if a Unix users issues the command $who | sort |lpr then the Unix shell would create three processes with two pipes between them: A pipe can be explicitly created in Unix using the pipe system call. Two file descriptors are returned--fildes[0] and fildes[1], and they are both open for reading and writing. A read from fildes[0] accesses the data written to fildes[1] on a first-in-first-out (FIFO) basis and a read from fildes[1] accesses the data written to fildes[0] also on a FIFO basis.
When a pipe is used in a Unix command line, the first process is assumed to be writing to stdout and the second is assumed to be reading from stdin. So, it is common practice to assign the pipe write device descriptor to stdout in the first process and assign the pipe read device descriptor to stdin in the second process. This is elaborated below in the discussion of multiple command pipelines. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
Where are the templates stored that are copied into the user's home directories for their personal customizations?
|
View Answer
|
|
Which NFS daemons are found on the NFS server?
|
View Answer
|
|
What SPARC emergency keyboard sequence will take the system to the ok prompt (forth monitor) but will send output to TTYA?
|
View Answer
|
|
What file controls system wide password aging?
|
View Answer
|
|
Which of the following can be an appropriate name for a cluster?
|
View Answer
|
|
What flag used with patchadd will prevent a later back out by preventing patchadd from backing up files? If this flag is used, the patch cannot be removed.
|
View Answer
|
|
What file do you put the umask setting in?
|
View Answer
|
|
When using the admintool, the membership list for groups is separated by what?
|
View Answer
|
|
Among the applications below, which one is not a client/server application?
|
View Answer
|
|
What command will display the VTOC for disk c0t0d0s0?
|
View Answer
|
|
In order to save a template in /etc/format.dat, what two steps must occur?
|
View Answer
|
|
What command enables a printer?
|
View Answer
|
|
What file contains the location of the namespace configuration textfiles such as hosts.rev, named.local, etc..?
|
View Answer
|
|
Which of the following commands can tell you whether packets are being delayed or dropped on your network?
|
View Answer
|
|
What file controls global variables for system wide values for the Bourne Shell?
|
View Answer
|
|
Partition sizes can be set manually or from what configuration?
|
View Answer
|
|
The hardware-level user interface that you see before the operating system has been started is called:
|
View Answer
|
|
Give the command that will display your default boot device.
|
View Answer
|
|
How many different kill signals are there?
|
View Answer
|
|
What software install group do you need to select in order to load the compilers?
|
View Answer
|