Can I copy xcode from my applications folder to external hard disk?
Have you reviewed the helpful details in this question? 

I have successfully moved Xcode to a different drive (though in my case an internal SSD), but as the answer says a simple move doesn't quite sort everything out, and you need to fix where various Command Line Tools think the install is. The problem with permissions is probably not due to it being an external drive. You need to get enough permissions to move files, which you can do at the command line ('terminal' application). If you don't know how, then look for help on moving and relinking directories in OS X and proceed carefully having practiced on tiny directories first, having taken a backup.

PS I can't comment on the question, wpbut I think your mean move not copy which makes a big difference.