0

how to copy between current directory to another directory eg. i am trying to copy my current directory i.e Desktop to var/www/html

cp form.html ./var/www/html 

receive a following error

cp: cannot create regular file ‘./var/www.html’: No such file or directory

1 Answer 1

2

Via

cp form.html /var/www/html

The dot means, relative to your current folder and you need an absolute path.

If form.html isn't a file but a folder, you should add the -r switch to copy recursively.

cp -r form.html /var/www/html

More about the cp command with man cp in a terminal or here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .