Which of the following UNIX/Linux pipes will ⋅c count the number of lines in all the files having h and as their extension in the current working directory?
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: D. cat *.[ch] | wc -l
Explanation
*.[ch] matches files ending in .c or .h; cat joins them and wc -l counts the lines.
More System Software and Operating System questions
- Which of the following statement/s is/are true? (i) Windows XP supports both peer-peer and client-server networks. (ii) Windows XP implemen…
- In Linux operating system environment _______ command is used to print a file.
- To overcome difficulties in Readers-Writers problem, which of the following statement/s is/are true? (i) Writers are given exclusive access…
- Suppose a system has 12 instances of some resource with n processes competing for that resource. Each process may require 4 instances of th…
- Dirty bit is used to show the
- Suppose for a process P, reference to pages in order are (1,2,4,5,2,1,2,4). Assume that main memory can accomodate 3 pages and the main mem…