LPI Exam Questions

Which of the following cp command parameters copies only when the source file is newer than the dest

Which of the following cp command parameters copies only when the source file is newer than the
destination file or when the destination file is missing?

A.
-u

B.
-l

C.
-p

D.
-s

Explanation:

The cp -u command copies only when the source file is newer than the destination file or when the
destination file is missing.
Answer option C is incorrect. The cp -p command copies the files from source to destination with
preserving file attributes, such as timestamps, mode, and ownership.
Answer option B is incorrect. The cp -l command links files from source to destination instead of
copying.
Answer option D is incorrect. The cp -s command makes symbolic links instead of copying.