find The find command takes a pattern as a command-line argument and recur- sively searches through directories to find a filename matching that pattern. It should print a relative path starting with "./" for every file/directory that matches. For example, running ./find ls.c from within the hw2 directory should print ./1s.c. If run from the parent directory, the output would be ./hw2/1s.c. There may be multiple matches. If we run ./find .c from within the hw2 directory, we should see: ./find.c ./1s.c ./tree.c The output does not need to be sorted. If nothing matches, it shouldn't print anything. Pattern matching should be case sensitive.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter14: Files And Streams
Section: Chapter Questions
Problem 15RQ
icon
Related questions
Question
find
The find command takes a pattern as a command-line argument and recur-
sively searches through directories to find a filename matching that pattern.
It should print a relative path starting with "./" for every file/directory
that matches.
For example, running ./find 1s.c from within the hw2 directory should
print ./1s.c. If run from the parent directory, the output would be . /hw2/1s.c.
There may be multiple matches. If we run ./find .c from within the
hw2 directory, we should see:
./find.c
./1s.c
./tree.c
The output does not need to be sorted. If nothing matches, it shouldn't
print anything. Pattern matching should be case sensitive.
Transcribed Image Text:find The find command takes a pattern as a command-line argument and recur- sively searches through directories to find a filename matching that pattern. It should print a relative path starting with "./" for every file/directory that matches. For example, running ./find 1s.c from within the hw2 directory should print ./1s.c. If run from the parent directory, the output would be . /hw2/1s.c. There may be multiple matches. If we run ./find .c from within the hw2 directory, we should see: ./find.c ./1s.c ./tree.c The output does not need to be sorted. If nothing matches, it shouldn't print anything. Pattern matching should be case sensitive.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,