I wrote a C program that works just like the 'ls - l' command on Unix machines. The purpose of the assignment was to use C in order to access the Unix run time environment. The type of Unix that was being used was Solaris so this program might not compile on other brands of Unix. It for sure will not compile on Windows Machines or on Macs (Sorry Bill and Steve). See here for full assignment details

Click here to download it  (7.97 Kb dir.zip)

or

Click here to download it  (7.85 Kb dir.tar.gz)

Use (after compiling mydir.c): mydir -[art] [file_path]
For the meaning of the flags 'art' see the assignment description
Note: Above command line assumes the executable created upon compilation is called mydir
Also Note: your C compiler must also have all the following C libraries as part of its system library to compile I'm listing them all even though number of them are standard C libraries.
  • assert.h
  • unistd.h
  • sys/types.h
  • sys/stat.h
  • dirent.h
  • stdlib.h
  • stdio.h
  • string.h
  • grp.h
  • time.h
  • pwd.h