Basic Ultilities Flashcards

1
Q

ls

A

lists names of files in current directory

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

cat

A

displays a text file

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

rm

A

deletes a file

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

rm -i

A

Asks permission and then deletes file

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

hostname

A

Displays the system name

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

cp

A

copies a file

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

cp a2q2.txt efib.c

A

Copies a2q2.txt to new file efib.c

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

mv

A

The move utility, rename file without copying or move file to different directory

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

mv memo.txt bird_memo.txt

A

Changes memo.txt to bird_memo.txt

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

lpr

A

Line printer, prints file to actual physical printer

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

lpstat -p

A

Lists available printers

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

lpr -P office report report2

A

Prints report and then report 2 from office printer

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

lpq

A

Lists printer queue

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

‘grep’ stands for?

A

Global regular expression print

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

head -5

A

Prints first 5 lines of file

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

tail

A

Prints last 10 lines of file

17
Q

sort

A

Displays file in alphabetic order

18
Q

sort -u

A

Displays file in alphabetic order with no duplicates

19
Q

uniq

A

Displays file, skipping adjacent duplicate lines

20
Q

diff -u

A

Unified format. Displays 2 files being compared - and + preceding, then displays the file contents preceding any differences with - and + options

21
Q

file

A

Identifies contents of file

22
Q

diff -r

A

Recursively compared files in 2 directories

23
Q

diff -y

A

Displays side by side comparison

24
Q

grep -v *

A

Displays the non-matches in files in working directory

25
Q

grep -i -c

A

Displays the number of matches regardless of capitalization