Multiple choice linux

Which of the following are valid Linux wildcards? (Choose all that apply)

    • and ?
  1. /

  2. ?

  3. &

  4. Z

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In Linux, * matches any string (including empty) and ? matches exactly one character. These are the two primary wildcards used in shell globbing and pattern matching. The forward slash / is a path separator, not a wildcard. & is a shell operator for background processes, and Z is simply a letter with no special meaning.

AI explanation

To answer this question, you need to understand Linux wildcards.

Option A) * and ? - This option is correct because * is a wildcard that represents any sequence of characters, and ? is a wildcard that represents any single character.

Option B) / - This option is incorrect because / is not a wildcard. It is used as a directory separator in Linux.

Option C) ? - This option is correct because ? is a wildcard that represents any single character.

Option D) & - This option is incorrect because & is not a wildcard. It is used as a control operator in Linux.

Option E) Z - This option is incorrect because Z is not a wildcard. It is just a letter.

The correct answer is A) * and ?. These wildcards are commonly used in Linux to represent patterns of filenames or commands.