Operating Systems (original) (raw)

Implementing the lsl Utility Program (ls -l)

Overall Plan


Obtaining Documentation on UNIX: The man command


How to Use Documentation

#include <sys/dir.h>
This line should be added near the top of your program, exactly as shown. * The names and types shown for functions near the man page, do NOT show how to use the functions. Instead they show how the functions are declared in the relevant include file. * Example: In the file /usr/include/dir.h there is a declaration for the opendir function that looks like:
DIR * opendir (char * fn); * This declaration says that opendir is a function that takes a character string and returns a pointer to a DIR structured value. * Some ways to use the opendir function in your program are:
DIR *pDIR;
pDIR = opendir(".");
pDIR = opendir("MyDirName");
pDIR = opendir("/tmp/somedir/somesubdir");

What is a directory? (folder)


The stat system call


Overview of lsl.cpp Program


Program and Scripted Output


Return to Contents