The purpose of the -r option in the cp command is to enable recursive copying. This means that when you use the -r option, the command will copy not only the specified directory but also all of its subdirectories and files. It allows you to duplicate an entire directory structure in one command, preserving the hierarchy of files and folders.
