I would like to copy the contents of a directory into another. I don't want to copy the directory and all files and directories under it, but just the contents of the directory just as if it were a regular file.
Doing cp -r target dest copies the directory and the entire hierarchy rooted in it.
Can anyone please suggest a command to do that? I get error if I do not include the -r option.
(I am calling cp from within a C program.)