Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

2 Answers 2

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
4  
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
add comment

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
add comment

Your Answer

 
discard

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.