Multiple choice technology operating systems

How can the time stamps of a file be preserved while copying a file?

  1. cp -i

  2. cp -r

  3. cp -p

  4. cp -R

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The cp -p command preserves file attributes including timestamps (atime and mtime), ownership, and mode. Regular cp copies content only. cp -r/-R are for recursive directory copies, and cp -i prompts before overwriting.