Friday, May 3, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 1559  / 3 Years ago, tue, august 17, 2021, 7:48:48

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


More From » command-line

 Answers
3

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* .


[#42962] Thursday, August 19, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
warrdel

Total Points: 356
Total Questions: 103
Total Answers: 118

Location: Bangladesh
Member since Sat, Jan 23, 2021
3 Years ago
;