Workbook 2 Filesystem Basics: Chapter 6 Examining Files Flashcards

1
Q

What command tells you a file’s type (ex: HTML document, MP3, gzip, etc)?

A

file command [56]

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

Using the cat command, how can you output all characters, including control characters?

A

cat -A [57]

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

Using the cat command, how can you number line output?

A

cat -n [57]

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

Using the cat command, how can you “ Squeeze” multiple adjacent blank lines into a single blank line

A

cat -s [57]

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

What navigation command in less and more moves you back one full screen?

A

PgUp [57]

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

How many lines do the head and tail command output by default?

A

10 lines [58]

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

Using the head command, give two command lines that output the first 5 lines of file1 and that suppress the header lines.

A

head -n 5 -q [58]

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

Using the tail command, give one command lines that output the last line of every file in /etc
and that suppress the header lines.

A

tail -n 1 -q /etc* [60]

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

Give one application of the tail command’s –f option.

A

tail -f is a follow switch that appended to a file [60]

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