Linux Module 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 what directory in the directory tree he is currently in?

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?

A

/home/resume

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 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 that there is a file whose filename begins with a (.) dot. What does this mean?

A

It’s 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

It is an executable file.

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?

A

Command and 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 searchers for and displays any text content of a binary fuke?

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

Press the 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 wild card 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 any changes

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

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

A

The first 10 lines of the file mary

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

The tac command:

A

displays the contents of a file in reverse order, last line first and first line last.

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 with the string with a ^.

18
Q

Linux has only one root directory per directory tree. True or False?

A

True

19
Q

Using wildcard meta characters, 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 in the command pwd and saw the output: /home/jim/sales/pending. How could that user navigate to the /home/jim directory?

A

cd ../..