Use streams, pipes and redirects Flashcards

1
Q

What is stdin?

A

Standard Input - from keyboard

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is stdout?

A

Standard Output - to screen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is stderr?

A

Standard Error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What redirection operator creates a new file or overwrites if the file exists for standard output?

A

>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What redirection operator creates a new file or appends if the file exists for standard output?

A

> >

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What redirection operator creates a new file or overwrites if the file exists for standard error?

A

2>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What redirection operator creates a new file or appends if the file exists for standard error?

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What redirection operator creates a new file or overwrites if the file exists for standard input and error?

A

&>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Sends the contents of a file to be used as standard input?

A

<

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What redirection operator would accept text on the following lines as standard input?

A

«

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What redirection operator uses a file for standard input and error?

A

<>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What device is used to discard messages?

A

/dev/null

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What command prints a message to screen as well as to a file?

A

tee

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What command builds a command list from it arguments?

A

xargs (eg find ./ -name “A” | xargs rm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly