6 - I/O redirection Flashcards

1
Q

stdout

A

*file linked to the screen to which output is sent to

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

stderr

A

*file linked to the screen to which status messages and errors are sent to

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

stdin

A

*file attached to the keyboard which accepts inputs

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

>

A

redirects stdout
*always rewrites from the beginning

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

> >

A

appends stdout instead of rewriting an entire file (for example)

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

file descriptors

A

numbers used by the shell to reference stdin/out/err (0,1,2)

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

redirecting stdout/err

A

&>
2>&1 *used after redirecting stdout

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

appending stdout/err

A

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

/dev/null

A

a file, system device, bit bucket
*accepts input and does nothing with it

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

cat

A

copies stdin to stdout
*takes input from stdin on its own

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

<

A

redirects stdin

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

pipe operator

A

’|’
redirects stdout to the stdin of another command

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

sort

A

a “filter”
*alphabetizes a list of data

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

uniq

A

removes adjacent duplicates from a file

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

wc

A

*word count
*displays the lines, word count, and byte size contained in files

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

grep

A

matches a text pattern to itself within files

17
Q

tee

A

copies its stdin both to stdout and to one or more files