Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

cp -r /opt/lampp/htdocs/codeigniter_2.0.2 /opt/lampp/htdocs/test/

That command is making this: /opt/lampp/htdocs/test/codeigniter_2.0.2 and I need only the content of codeigniter_2.0.2 inside test.

Thanks in advance for any help.

share|improve this question
up vote 3 down vote accepted

Try the following:

cp -r /opt/lampp/htdocs/codeigniter_2.0.2/* /opt/lampp/htdocs/test/
share|improve this answer
If there are hidden file, it is better to use the syntax cp /from/path/. /to/path – enzotib Aug 12 '11 at 6:10
I have tried using * but some files inside codeigniter_2.0.2 where not copied, only the folders – Gerep Aug 12 '11 at 11:30
@enzotib that dot made the difference =) thanks – Gerep Aug 12 '11 at 11:35

here's a workaround

cp -r /opt/lampp/htdocs/codeigniter_2.0.2 /opt/lampp/htdocs/temp && mv /opt/lampp/htdocs/temp/codeigniter_2.0.2/* /opt/lampp/htdocs/test/ && rm -r /opt/lampp/htdocs/temp

that's assuming Sergey's answer doesn't work, because if it does it isn't unnecessarily complicated like mine :D

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.