Back
This is the option you're looking for is -R.
cp -R path_to_source path_to_destination/If destination doesn't exist, it will be created.-R means copy directories recursively. You can also use -r since it's case-insensitive.Note the nuances with adding the trailing / as per @muni764's
cp -R path_to_source path_to_destination/
Want to be a Linux expert? Come and join this Linux course
Do check out the video below
31k questions
32.8k answers
501 comments
693 users