Which command is used to copy all files having the string chap and any two characters after that to the progs directory?
A. cp chap?? progs
B. cp chap* progs
C. cp chap[12] /progs/*.*
D. cp chap?? /progs/*
E. None of the above
Answer: Option A
Solution (By Examveda Team)
In Unix, the cp command is used to copy files or directories. The pattern chap?? matches files with the string chap followed by any two characters. When followed by progs, it indicates that all files matching this pattern should be copied to the progs directory.So, cp chap?? progs is the correct command to copy all files having the string chap and any two characters after that to the progs directory.
Join The Discussion