Process text streams using filters Flashcards

1
Q

What command will combine two or more text files into a single file?

A

cat - concatenate (eg cat first.txt second.txt > combined.txt)

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

What command joins two files by matching the contents of specified fields?

A

join - note uses the first field to match on

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

What command will merges files line by line?

A

paste

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

What command will convert tabs into spaces?

A

expand

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

What command can display non text files?

A

od

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

What command would order a file?

A

sort

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

Which command will break a file into smaller pieces?

A

split

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

Which command will change individual characters?

A

tr - translate

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

What command will convert spaces into tabs?

A

unexpand

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

What command will remove duplicate lines in a file?

A

uniq

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

What command will clean up paragraphs in a text file?

A

fmt - format

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

What command will number lines in a file?

A

nl - numbering lines

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

What command prepares a file for printing?

A

pr

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

What command shows the first 10 lines of a file?

A

head

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

What command shows the last 10 lines of a file?

A

tail

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

What option will keep displaying new lines as they appear at the end of a file?

A

tail -f or –follow

17
Q

What is the upgraded version on more?

A

less

18
Q

What command is used to extract portions of a text file?

A

cut

19
Q

What command will count words in a file?

A

wc - word count