Answers

Question and Answer:

  Home  Unix System Calls

⟩ Explain c program to implement the Unix or Linux command to implementls -l >output.txt?

read the files in current directory using opendir and

readdir system calls. readdir will return filenames in the

directory. For each entry returned by readdir system call,

use stat system call to read statistics of the file. Stat

system call will give all the info about the file as that

of ls -l command.

 229 views

More Questions for you: