Lab 13



Write a shell script to produce friendly file information.
Script uses
  1. The file test operator
  2. The ls command
  3. The stat command
  4. Examples
    1. Not a filename
      $ ./fileinfo a
      Error
      
    2. On a file
      $ ./fileinfo HWK22
      HWK22 is a file
      4 Blocks 711 Bytes
      You can read this file
      You can write this file
      You cannot execute this file
      Last access  2005-02-23 04:38:59
      Last Modification  2004-07-20 14:15:57
      Last Inode Change  2004-07-20 14:15:57
      
    3. On a directory
      $ ./fileinfo mail
      mail is a directory
      4 Blocks 4096 Bytes
      You can read this file
      You can write this file
      You can execute this file
      Last access  2005-02-23 04:49:38
      Last Modification  2005-02-16 15:02:56
      Last Inode Change  2005-02-16 15:02:59
      
  5. When you get this working email the script and several examples of usage.
© Allan Kochis Last revision 5/31/2005