cp command in Unix

cp is the copy command in Unix environment.

Example: cp -fRvp source destination

-f = For each existing destination pathname, remove it and create a new file, without prompting for confirmation regardless of its permissions.

-R = If source designates a directory, cp copies the directory and the entire subtree connected at that point.

v = Verbose mode, shows files while they are copied

p = Cause cp to preserve the following attributes of each source file in the copy: modification time, access time, file flags, file mode, ACL, user ID and group ID, as allowed by permissions.

source = e.g. /Volumes/HDD1/Project2015

destination = e.g. /Volumes/HDD2/Project2015_Backup

The cp utility exits 0 on success, and >0 if an error occurs.