Computer Science - Unix - Discussion
Discussion Forum : Unix - Section 1 (Q.No. 4)
4.
Which command is used to copy all files having the string chap and any two characters after that to the progs directory?
Discussion:
11 comments Page 1 of 2.
Subhashree Das said:
1 decade ago
If there is directory "progs" then you can not create a file with the same name. When you want to copy multiple files to a single location. Then you can only copy it to a directory, not a file.
Sambit said:
9 years ago
The question asking for progs directory without even mentioning the location of it, then why the answer 'D' is not correct while 'A' is correct. Can anybody elaborate?
(1)
Mahesh said:
9 years ago
It's working correctly when I used char* but when I used char it occurs an error as.
cp: cannot stat 'chap??': No such file or directory.
How to solve this?
cp: cannot stat 'chap??': No such file or directory.
How to solve this?
Amol said:
9 years ago
@Chet.
?? means any two characters. If you used char* it will show files whose name starting from char like, charcoal, character etc.
?? means any two characters. If you used char* it will show files whose name starting from char like, charcoal, character etc.
Shekhar said:
4 years ago
@Mahesh.
Check chap length it should be 6. Then chap? will work.
You used chap* for this length not matters.
Check chap length it should be 6. Then chap? will work.
You used chap* for this length not matters.
Bhanu said:
1 decade ago
How do we identify it to be a directory when it is not specified? can't we misinterpret to be a file?
Lakshmi said:
1 decade ago
Question says progs directory, so doesnt that mean / should be present ?
Please explain answer.
Please explain answer.
Ramesh said:
1 decade ago
Its not the string in the file. But the name of the file itself.
Priyanka said:
10 years ago
Hey for copying all files with chap we use * why question mark?
Harryme said:
9 years ago
?? is first two character.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers