Copy a file
copy a file in linux | duplicate a file | make a copy of a file | cp file to another folder | cp | copy | filesCaution: This command changes the system. Understand what it does before you run it.
cp -ip -- /var/www/vhosts/example.com/httpdocs/.htaccess /var/www/vhosts/example.com/private/htaccess-copyCopies QUELLE to ZIEL. If ZIEL is an existing directory, the copy is placed inside it under the original name. -p keeps permissions, owner (where allowed) and timestamps, -i asks before overwriting.
Note: Whole directories have their own entry using cp -a.
Also searched as
- copy a file in linux
- duplicate a file
- make a copy of a file
- cp file to another folder