TestOut Linux Pro Practice Test 2025 – Complete Exam Prep Guide

Question: 1 / 400

Which command is used to copy files and directories in Linux?

mv

cp

The command used to copy files and directories in Linux is 'cp'. This command stands for "copy" and is specifically designed for duplicating files and directories from one location to another. When you use 'cp', you can specify various options to control its behavior, such as preserving file attributes with the '-p' option or copying directories recursively with the '-r' option.

While 'mv' is used to move files and directories and can sometimes function similarly for specific use cases, it is not intended for making copies; instead, it relocates items. The 'rsync' command is primarily used for syncing files and directories between two locations, often over a network, and it provides more features for data transfer and backup but is not strictly a copying command in the same basic sense as 'cp'. The 'cat' command is typically used to concatenate and display content of files, not for copying them.

Thus, the 'cp' command is the appropriate choice when the goal is to copy files and directories in Linux.

Get further explanation with Examzify DeepDiveBeta

rsync

cat

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy