Input, Output, Redirection Flashcards

1
Q

What are the default Input/Output types?

A

stdin, stdout, stderr

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

What are the number representations of I/O types?

A
stdin = 0
stdout = 1
stderr = 2
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does the > character does in redirection?

A

redirects standard output to a file overwriting its contents

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

How can you redirect stdout to a file but appending that content?

A

> >

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

How can you redirect the content of a file to a command?

A

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

What does 2>&1 stands for?

A

Combines stderr and stdout

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

What does 2>file means?

A

Redirect stderr to a file

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

What does 2> /dev/null means?

A

Redirect stderr to nowhere

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