September 19, 2011 | Commands | No Comments|
cp – command copies files and directories.
cp [options] source_file destination_file
cp [options] source_file destination_directory
-a preserves all the attributes of a file.
-b creates a backup copy before copying the file.
-d copy the link, but not the file pointed to by this reference.
-i asks for confirmation before overwriting files.
-l creates hard links instead of copying files.
-p preserves the owner, permissions and time stamp of the file.
-r recursively copies the files in all subdirectories.
-s creates a soft link instead of copying files.
-u copies the file only if it is newer than the destination file.
-v verbose during the copy process.
-help displays help for the team.
Team cp copies one file to another. You can also copy multiple files from one directory to another.