Git Bash cmds - Unix like (Wk 2 UCSD) Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

pipe the output of cat foo.txt to wc command input

A

cat foo.txt | wc

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

what is a filter command

A

takes inputs and transforms, placed after unix pipe

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

count the number of files in a dir w/ the word fruit in them

A

ls | grep fruit | wc -l

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

count the number of unique lines in a txt file using pipes

A

uniq file.txt | wc -l

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

command to report process status

A

ps (has multiple options)

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

useful commands for text analysis

A

cat, grep, wc, sort, uniq, head, tail, cut, sed, find

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

head command

A

listing the first n lines of a text file

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

tail command

A

lists the last n lines of a text file or input stream

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

cut sommand

A

cut a portion of each line in a file

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

SED command (stream editor)

A

basic text transformations on an input stream

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

find command

A

quick searches in our file sys hierarchy

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