To copy a directory and its contents, you can use the cp command with the -r (recursive) option. The syntax is as follows:
cp -r source_directory destination_directory
For example, to copy a directory named source_dir to a new directory named destination_dir, you would use:
cp -r source_dir destination_dir
This command will copy source_dir and all of its contents (files and subdirectories) into destination_dir. If destination_dir does not exist, it will be created.
