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.

Assuming I'm not in my home directory, I want to copy all the files starting with "a" from my home directory to my current directory.

I've tried cp ~ a* . and different variations of that but it hasn't worked at all. Thank you.

Edit: *Thank you again

share|improve this question
2  
Super-fast answers you've received! –  nitstorm Oct 15 '11 at 19:22

3 Answers 3

up vote 3 down vote accepted

This should do the trick:

cp -r ~/a* <path-to-end-directory>

Your current directory is ., the directory above you is .. .

So the exact command you'd want is cp -r ~/a* .

share|improve this answer

cp ~/a* . should work.

share|improve this answer

The solution would be cp ~/a* .

share|improve this answer

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.