Which of the following are valid Linux wildcards?

    • and ?
  1. /

  2. ?

  3. $


Correct Option: A

AI Explanation

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

Wildcards are special characters used in Linux to represent one or more characters in a file or directory name. They are often used in commands such as ls and rm to specify a pattern of files to match.

Let's go through each option to understand why it is correct or incorrect:

Option A) * and ? - This option is correct because * represents any sequence of characters, including none, and ? represents any single character. These are commonly used wildcards in Linux.

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

Option C) ? - This option is incorrect. Although ? is a valid wildcard in Linux, it is not the only valid wildcard. The correct answer should include more than just the ? wildcard.

Option D) $ - This option is incorrect. The dollar sign ($) is not a wildcard in Linux. It is often used in shell scripting to represent the value of a variable.

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

Find more quizzes: