Difficulty: Easy
Correct Answer: cp
Explanation:
Introduction / Context:
Copying files is a fundamental UNIX/Linux task. While several utilities can archive or stream data, only one standard command is used for straightforward file-to-file copying within the filesystem.
Given Data / Assumptions:
Concept / Approach:
The cp command copies files and directories. Typical usage is cp source destination or cp -r src_dir dst_dir for directories. Other tools like tar and cpio create archives or stream file trees; they are overkill for a simple copy. The command copy is DOS/Windows syntax, not POSIX.
Step-by-Step Solution:
Verification / Alternative check:
Run ls -l on the destination to confirm the file exists and has expected size and permissions. For integrity, compare checksums with sha256sum source destination.
Why Other Options Are Wrong:
tar, cpio: Archiving/streaming tools, not simple copy commands. copy: DOS/Windows command, not standard on UNIX/Linux. None of the above: Incorrect because cp is correct.
Common Pitfalls:
Forgetting -r when copying directories; accidentally overwriting existing files (use -i to prompt); losing attributes (use -a when needed).
Final Answer:
cp
Discussion & Comments