Wildcards Flashcards

1
Q

When can wildcards be used?

A

In whatever command that receives a file or a directory as an argument

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

What is the * for when use in ls command?

A

It stands for match 0 or more characters

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

How can you match exactly one character when using ls command (it doesn’t matter what character is)?

A

?

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

How can we use a character class when using ls command?

A

with brackets [], an example for matching all the vowels is [aeiou]

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

Does the character classes have a negation operand when using ls command?

A

Yes, if you do [!aeiou] it will match all the characters that are not the vowels.

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

How can you specify a range with character classes when using ls command?

A

an example of a range is [1-6] this means any number from 1 to 6 (they are inclusive, meaning 1 and 6 also match).

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

Name some named character classes when using ls command?

A

[[:alpha]], [[:digit]], [[:alnum]], [[:lower]], [[:upper]]

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

How can we escape a character when using wildcards?

A

\

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