To copy files with different extensions, you can specify each file individually in the cp command. Here's the syntax:
cp file1.ext1 file2.ext2 file3.ext3 destination_directory/
For example, if you want to copy document.pdf, image.png, and notes.txt to a directory named backup, you would use:
cp document.pdf image.png notes.txt backup/
If you want to copy all files with specific extensions (e.g., .txt and .jpg), you can use multiple commands or combine them with wildcards. For example:
cp *.txt backup/
cp *.jpg backup/
This will copy all .txt files and all .jpg files to the backup directory.
