I want to copy all contents in folder A(but not include A itself) to another folder B recursively, and overwrite any existing files or folders with the same name.
Originally I plan to use the following command:
cp -f -r /home/alan/A/* /home/alan/B/
However, after searching online, I find all others recommend the following format:
cp -f -r /home/alan/A/. /home/alan/B/
such as:
How can I copy the contents of a folder to another folder in a different directory
How to copy files from the folder without the folder itself
The strange thing is that I cannot find any official document on this advanced cp
command. I tried to use:
man cp
info coreutils 'cp invocation'
cp --help
But none of them indicate such usage. How can I find the official document on advanced cp command and usage?
Thank you very much.