I/O Flashcards

(8 cards)

1
Q

How to redirect standard error?

A

sth 2> target

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

What are 0>, 1>, 2> operators?

A

They redirect standard input, output and error respectively.

Alias for 1> is >

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

How to redirect something to standard stream?

A

sth >&1 redirects sth to standard output by file descriptor reference(1)

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

How to redirect both standard output and error?

A

sth &> target

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

How to ignore error output of command?

A

command 2> /dev/null

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

What does “cat” command do?

A

Read and concatenate file(s) and redirect to so

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

What is the difference between > and | operator for redirecting output?

A

> operator redirects to file

| operator redirects to another command input

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

What does “tee” command do?

A

Redirect received input to file and pass it also to standard output to proceed in pipeline

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