Globbing, Quoting and Searching Flashcards

1
Q

How do you match zero or more characters?

A

*

i.e ls sc*

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

How do you match a specified number of characters?

A

?

i.e ls tr??

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

How do you match specified characters?

A

[]

i.e ls [SsLlPp]ink

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

How do you match specified numbers?

A

[1-9]

i. e ls script[1]
i. e ls script[2-7]

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

How do you omit characters when matching?

A

[^]

i.e ls [^Ioa]oft

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

How do you echo a variable within quotes?

A

””

i.e echo “$PATH”

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

How do you echo a string containing a dollar sign?

A

’’ or \

i. e echo ‘$3.50’
i. e echo “$3.50”

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

How do you list a file/directory containing spaces?

A

’’ or “” or \

i.e mkdir Secret\ Space

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

How do you type a command extending to multiple lines?

A

\
i.e ls \
file1 \
file2

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

What character designates a root vs standard user at a terminal?

A

$ - standard user
# - root user
i.e [root@lukebakare1c ~]#

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

What is the command to search a database of files and directories for a matching name?

A

locate

i.e locate directory1

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

What is the command to search for a file/directory in a specific location?

A

find

i.e find /etc/ -name ‘yum*’

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

How do you search for the location of a command?

A

whereis

i. e whereis grep
* locates binary, source files and manual pages

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

How do you lookup what a command does?

A

whatis
man -f
i.e whatis yes
*searched man pages for a command (1-9)

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

How do you lookup the documentation for a command?

A

man

i.e man test

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

How do you search for a command contained within man pages?

A

apropos
man -k
i.e apropos ssh

17
Q

What is an alternate to man to get information on a command?

A

info

18
Q

What locations are common outside of the man pages for documentation?

A

/usr/doc/packagename
/usr/share/doc/packagename
/usr/share/doc/packages/packagename
*varies with distribution

19
Q

Where are many configuration files located?

A

/etc/