recursive directory listing help
i am trying to design and write a C program that carries out a recursive directory listing, functionally similar to the Unix "ls -lR". This C program will use at least the following system calls, opendir, chdir, readdir, and stat.
A fairly crude version of doing this would be
Code:
file recls in your home directory contains:
for I in * do
print $I
if test -d $I
cd $I
sh $HOME/recls
cd ..
fi
done
but i am looking to do this in a more complex way, any help would be greatly recieved
thanks
laney