Question: Write a simple version of the find program for xv 6 : find all the files in a directory tree whose name matches a string.

Write a simple version of the find program for xv6: find all the files in a directory
tree whose name matches a string.
Some hints:
Look at ls.c to see how to read directories.
Dont try to find any files in the . and .. directories.
3| P a g e
Changes to the file system persist across runs of QEMU; to get a clean file
system run make qemu.
Your solution is correct if produces the following output (when the file system
contains a file a/b):
$ make qemu
...
init: starting sh
$ echo > b
$ mkdir a
$ echo > a/b
$ find . b
./b
./a/b
$

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!