Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

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
Super-fast answers you've received! – Nitin Venkatesh Oct 15 '11 at 19:22
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


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.