The 'cp -p' command preserves file attributes including timestamps when copying files. The -p flag explicitly tells cp to maintain the modification time, access time, file modes, and other attributes. By default, cp updates timestamps to the current time, so -p is required to preserve the original file's timestamps.