Hi all,
I'm new to C and I have an assignment to write our own linux ls command.
When we type ls -R , it recursively list the target directory. Really have no clue how to do that . Appreciate your help in advance !!
magicor 0 Newbie Poster
Recommended Answers
Jump to PostSo have you done 'ls' without the -R part already?
Use the stat() function to work out what kind of thing a directory entry is, then call your file listing function recursively.
All 2 Replies
Reply to this topic Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.