Input/output redirection Flashcards

1
Q

What constitute the standard streams?

A

Standard input (stdin), standard output (stdout) and standard error (stderr).

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

Stdin from file?

A

mycommand

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

Stdout to file (create, overwrite)?

A

mycommand > outfile

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

Stdout to file (append)?

A

mycommand&raquo_space; outfile

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

Stderr to file (create, overwrite)?

A

mycommand 2> errorfile

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

Stdout and stderr to different files (create, overwrite)?

A

mycommand > outfile 2> errorfile

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

Stdout and stderr to the same files (create, overwrite)?

A

mycommand &> outfile

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