Score:0

Can we copy a sub directory to another sub directory?

ke flag

I have to copy wordpress from the give path to htcdocs directory :-/var/www/html/wordpress and I have to copy this wordpress to /opt/lampp/htcdocs . Direct copy paste is not allowed. I tried different commands and ended up with errors

ru flag
What 'errors' are you encountering? If they're permission errors you need to copy things around with `sudo` on the command line.
Stoic-Programmer avatar
ke flag
I need command to copy sub-directories within the root directory. I am new Ubuntu user , so guide me accordingly.
Score:0
eg flag

I prefer rsync for such a task:

rsync -a /var/www/html/wordpress/ /opt/lampp/htcdocs

should do the trick. If you run into permission errors, sudo might be your friend:

sudo rsync -a /var/www/html/wordpress/ /opt/lampp/htcdocs

btw: htcdocs seems to hold a typo, maybe you meant htdocs - right?

Stoic-Programmer avatar
ke flag
yeah it is htdocs . pardon me
Stoic-Programmer avatar
ke flag
Thanks it worked for me.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.