Chapter 3 Flashcards

1
Q

A directory is a type of file. True or False?

A

True

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

Which command would a user type
on the command line to find out the
current directory in the directory tree?

A

pwd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
Which of the following is an absolute
pathname? (Choose all that apply.)
a. Home/resume
b. C:\myfolder\resume
c. resume
d. /home/resume
e. C:home/resume
A

B

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

A special device file is used to _________.

A

represent hardware devices such as

hard disk drives and ports

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

If a user’s current directory is /home/
mary/project1, which command could
she use to move to the etc directory
directly under the root?

A

cd /etc

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

After typing the ls –a command, you
notice a file whose filename begins with
a dot ( . ). What does this mean?

A

Hidden file

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

After typing the ls –F command,
you notice a filename that ends with an
* (asterisk) character. What does this
mean?

A

Executable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
The vi editor can function in which two
of the following modes? (Choose both
that apply.)
a. text
b. command
c. input
d. interactive
e. insert
A

b command, e insert

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

The less command offers less
functionality than the more command.
True or False?

A

False

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

Which command searches for and
displays any text contents of a binary
file?

A

strings

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

How can a user switch from insert mode
to command mode when using the vi
editor?

A

esc key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
If “resume” is the name of a file in
the home directory off the root of the
filesystem and your present working
directory is home, what is the relative
name for the file named resume?
A

resume

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

What will the following wildcard regular

expression return: file[a-c]?

A

filea fileb filec

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

What will typing q! at the : prompt in
command mode do when using the vi
editor?

A

quit without saving

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

A user types the command head /
poems/mary. What will be displayed on
the terminal screen?

A

first 10 lines of mary

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

The tac command _________.

A

file in reverse order

17
Q

How can you specify a text pattern that
must be at the beginning of a line of text
using a regular expression?

A

Precede the string with a ^.

18
Q

Linux has only one root directory per

directory tree. True or False?

A

True

19
Q

Using wildcard metacharacters, how can
you indicate a character that is not an a
or b or c or d?

A

[!a-d]

20
Q

A user typed the command pwd and saw
the output: /home/jim/sales/pending.
How could that user navigate to the /
home/jim directory?

A

cd ../..