CSc 3320 System-Level Programming
Summer 1999
Homework #4
Due: 2 August 1999 (Monday)

Write a C program, called myls, to display file names and their date and time stamps. The program should have a command line parameter which denotes a file specification (which may be an exact file name or a suffix of a file name such as sql or c). The output should look as follows:

% myls sql
  p1.sql         10-AUG-1996 10:00 AM
  prog1.sql      16-JAN-1995 12:20 PM
  p.sql          20-DEC-1995 11:15 AM
D ch6sql         20-DEC-1995 11:15 AM
  qq.sql         11-SEP-1991 03:25 PM
% 
Remarks:
  1. The names of the matching files must be left justified and the dates and times must be formatted as shown above.
  2. If the file is a directory file, the letter D should appear to the left of the file name.
  3. If the file specification is missing, the command should list all the files in the current default directory.