Table-Dir

Kostas Lialiambis admin at edessa.topo.auth.gr
Sat Aug 1 19:46:09 EEST 1998


Tasos Bassoukos wrote in message <35C26F19.515CEA6A at aix.meng.auth.gr>...

>Mallon prepei na kanei thn douleia pou 8es, kai kapou 16 fores pio
grhgora[2].


Without amphiboly (whatever that bloodily means), to pio grhgoro ap' ola
(kai synama to prokalon to minimum load sto systhma) einai to arxiko
progrmmataki se C poy eixa kanei alla 8elei beltiwsh gia na mhn paroysiazei
ta dot-arxeia, na ta sortarei klp.

By the way, thanx se osoys dwsane enallaktic solutions sto fuckin' bloody
script moy.

#include <stdio.h>
#include <dirent.h>
#include <time.h>
#include <sys/stat.h>
#include <unistd.h>

main()
{
  DIR *d;
  struct dirent *next;
  struct stat buf;

  if(!(d=opendir(".")))
  {
    printf("Can't open that bloody dir, luv!\n");
    return(69);
  }

  printf("<CENTER>\n<TABLE BORDER=4>\n");
  printf("<TR><TD>Filename<TD>Last Modified<TD>Filesize\n");

  while((next=readdir(d)))
  {
    stat(next->d_name,&buf);
    printf("<TR><TD><A HREF=\"%s\">%s</A><TD>%s<TD ALIGN=RIGHT>%u\n",
            next->d_name,
            next->d_name,
            ctime(&buf.st_mtime),
            buf.st_size);
  }
  printf("</TABLE>\n</CENTER>\n");

  closedir(d);
  return(0);
}


Kor.



--
====================================================================
Gia boithia (h na diagrafhte) e-mail sto majordomo at argos.hol.gr
Ta archives tis listas einai sto http://www.argos.hol.gr/lists :
prin steilete kapoia erothsh psakte mipos exei hdh apanththei.
Gia opoiodipote problima stilte e-mail ston owner-linux-greek-users
====================================================================



More information about the Linux-greek-users mailing list