Difficulty: Easy
Correct Answer: cat
Explanation:
Introduction / Context:
The Unix philosophy emphasizes small tools that do one thing well. The cat command (concatenate) is one of the oldest and most frequently used commands for displaying file contents and assembling files from input streams, making it essential knowledge for shell users and administrators.
Given Data / Assumptions:
Concept / Approach:
cat file prints the file's contents to standard output. You can combine multiple files (cat f1 f2 > combined) or create a quick file with cat > newfile, then type lines and press Ctrl+D to save. Editors like ed or vi are for interactive editing, not simple display, and lyrix is not a standard Unix utility.
Step-by-Step Solution:
Verification / Alternative check:
Compare cat with less or more; the latter paginate content, while cat streams the entire file. For editing, use vi or nano instead of cat.
Why Other Options Are Wrong:
Common Pitfalls:
Using cat on very large files can flood the terminal; prefer less for paging. Beware of accidental truncation when redirecting output with > to an existing file. For appending, use >> instead.
Final Answer:
cat
Discussion & Comments