Results 1 to 4 of 4
Hi ,
how to implement the ls command using system call......
how it is coded ?
pls tell me the hints to follow.........
Thanks in Advance...
- 01-30-2008 #1Linux Newbie
- Join Date
- Oct 2006
- Posts
- 107
implementing ls
Hi ,
how to implement the ls command using system call......
how it is coded ?
pls tell me the hints to follow.........
Thanks in Advance
- 01-30-2008 #2Linux Enthusiast
- Join Date
- Aug 2006
- Posts
- 631
Try:
RegardsCode:man 2 stat
- 01-30-2008 #3
aaaaaaaaaaaaaaaaaaaaaaaaaand:
Code:man 3 opendir
--
Bill
Old age and treachery will overcome youth and skill.
- 01-30-2008 #4
Indeed. glibc contains many functions for traversing directories. wje's link is good, but for a more centralized resource:
File System Interface - The GNU C Library
This way, you can get the files, but to determine permissions, etc., you will need the stat() function.DISTRO=Arch
Registered Linux User #388732


Reply With Quote