Difficulty: Easy
Correct Answer:
Explanation:
Introduction / Context:
Filename expansion (globbing) lets you select sets of files using wildcards in the shell. Understanding how each wildcard behaves is essential for writing correct commands, avoiding accidental matches, and building robust scripts.
Given Data / Assumptions:
Concept / Approach:
The asterisk * matches any sequence of characters, including the empty string. The question mark ? matches exactly one character. Bracket expressions like [ijk] match exactly one character from a specified set, while [!ijk] matches exactly one character not in the set. Therefore, * is the general wildcard for “zero or more characters.”
Step-by-Step Solution:
Verification / Alternative check:
Run echo .txt to see which names expand. To include hidden files, use a leading dot like . or enable dotglob in Bash.
Why Other Options Are Wrong:
? matches exactly one character. [ijk] matches one character chosen from i, j, k. [!ijk] matches one character not in {i, j, k}. None of these allow zero or variable-length matching.
Common Pitfalls:
Expecting * to match dotfiles; confusing globbing with regular expressions where . and * have different meanings; forgetting quotes which can prevent expansion when desired.
Final Answer:
mail
program's internal command set, which command forwards the current message to the specified user-list?
Discussion & Comments