How to copy file in the server to another folder with putty

5.5k views Asked by At

I would like to copy or move some file a.xml from /tmp to another folder in the same server /var/lib/myfolder.

I tried the following with putty:

user@server:/tmp$ mv a.xml /var/lib/myfolder

I get the error message, that this operation is not allowed.

How can I copy or move this file to another folder?

Update:

Error message:

mv a.xml is not possible: The operation is not allowed

2

There are 2 answers

0
luca76 On

The solution is to, as my comment, write this command:

sudo mv a.xml /var/lib/myfolder
0
Sriharsha Kalluru On

Try cp and then rm the source file.

cp a.xml /var/lib/myfolder
rm -f a.xml