#cp
4 one-liners with this tag.
All one-liners tagged cp
Copy a directory with its contents
$cp -a -- /var/www/vhosts/example.com/httpdocs/wp-content/themes/mytheme /var/www/vhosts/example.com/httpdocs/wp-content/themes/mytheme-copy
Copy a file
$cp -ip -- /var/www/vhosts/example.com/httpdocs/.htaccess /var/www/vhosts/example.com/private/htaccess-copy
Create a dated backup copy of a file
$cp -p -- /var/www/vhosts/example.com/httpdocs/.htaccess /var/www/vhosts/example.com/httpdocs/.htaccess.bak-$(date +%F-%H%M)
Copy a file from a Docker container to the host
#docker cp app:/etc/nginx/nginx.conf /root/nginx.conf