#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>


int main(int argc, char *argv[])
{
 struct stat attribut;

 while(*++argv) /*Einzelne Argumente durchlaufen*/
  {
   printf("%18s = ",*argv);
   if(stat(*argv, &attribut) == -1)
      {
       fprintf(stderr,"Fehler bei stat?!?...\n");
       exit (1);
      }
    printf("%o\n", attribut.st_mode & 0777);
  }/*Ende while*/
 return 0;
}