CP Option Description
Syntax: CP [option] source file or directory destination file or directory
Note: This command copies the specified source files to the destination file or copies multiple source files to the destination directory.
The options for this command have the following meanings:
-A This option is typically used when copying a directory. It retains links, file attributes, and recursively copies the directory, which is equal to the combination of the DPR option.
-Keep links when copying D.
-F Delete a target file that already exists without prompting.
-I and F options, in contrast, will prompt the user for confirmation before overwriting the target file. Answer y when the target file will be overwritten, is an interactive copy.
-P At this point, the CP will also copy the modified time and access rights to the new file in addition to the contents of the source file.
-R If the source file is a directory file, the CP will recursively replicate all subdirectories and files in that directory. The destination file must be a directory name at this time.
-L do not make copies, just link files.
--------------
CP-RF/var/www/usr/local/apache2/htdocs
www This directory was copied under Htdocs, and the name is also this directory www.
And in fact, what I want is the www file under Htdocs.
This solution is OK:
CP-RF/var/www/* /usr/local/apache2/htdocs/
Linux Copy file CP