Difficulty: Easy
Correct Answer: None of the above
Explanation:
Introduction / Context:
Unix-like systems are permissive about filenames. Knowing what is valid helps avoid needless errors when creating, copying, or scripting across files. Unlike DOS-era systems with strict 8.3 naming, modern Unix supports long names, spaces, and punctuation (with a few caveats).
Given Data / Assumptions:
Concept / Approach:
Unix filenames can contain any byte except the NUL character and the forward slash. Case is significant (TRY and try are different). Spaces and leading dots are allowed, although they may require quoting or escaping at the shell prompt.
Step-by-Step Solution:
Verification / Alternative check:
On a Unix shell, running touch "my .file" creates the file successfully. ls -l then lists it normally. This demonstrates that spaces and dots are permissible in filenames.
Why Other Options Are Wrong:
Common Pitfalls:
Assuming spaces or leading dots are forbidden. Spaces require quoting to avoid word-splitting by the shell, and a leading dot merely marks a file as hidden in many tools. Truly invalid characters are only the forward slash and the NUL byte; other restrictions may come from specific filesystems or tools.
Final Answer:
None of the above
Discussion & Comments