Find the answer to your Linux question:
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...
  1. #1
    Linux 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

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2006
    Posts
    631
    Try:

    Code:
    man 2 stat
    Regards

  3. #3
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    aaaaaaaaaaaaaaaaaaaaaaaaaand:
    Code:
    man 3 opendir
    --
    Bill

    Old age and treachery will overcome youth and skill.

  4. #4
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...