Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> OT RE: Year of Unix file

OT RE: Year of Unix file

From: Mohan, Ross <MohanR_at_STARS-SMI.com>
Date: Mon, 30 Jul 2001 13:34:05 -0700
Message-ID: <F001.00359638.20010730133545@fatcity.com>

Maybe
it's just me, and it could be because I am not following this thread at all, but.....
<FONT face=Arial color=#0000ff

size=2> 
Is
this the list's longest running thread to date? lol.....
<FONT face=Arial color=#0000ff

size=2> 
no
offense meant!
<FONT face=Arial color=#0000ff

size=2> 
-
Ross

  <FONT face=Tahoma
  size=2>-----Original Message-----From: Brian MacLean   [mailto:bmaclean_at_vcommerce.com]Sent: Monday, July 30, 2001 5:21   PMTo: Multiple recipients of list ORACLE-LSubject: RE:   Year of Unix file
  save the following as fstat.c, compile it with "cc -o fstat   fstat.c", then run it as "fstat myfile"   #include <stdio.h> #include
  <sys/types.h> #include <sys/stat.h>
  #include <errno.h> #include
  <time.h>
  int rtn; struct stat buf_st;
  struct tm *tm_st;
  main( argc, argv, envp) int
  argc; char **argv, **envp; <FONT
  size=2>{   time_t now; <FONT

  size=2>  if( argc != 2 )   { 
      fprintf( stderr, "Error: number of args\n" 
  );     exit( 1 ); <FONT 
  size=2>  }   rtn = stat( argv[1], 

  &buf_st );   if( rtn != 0 ) <FONT
  size=2>  {     fprintf( stderr,
  "stat() return code=%d\n", rtn );       perror( "error text=" );    
  exit(1);   }  
  fprintf( stderr, "FILE=%s\n", argv[1] );   
  fprintf( stderr, "SIZE=%d\n", buf_st.st_size );   
  fprintf( stderr, "MODE=%d\n", buf_st.st_mode ); 
    tm_st = localtime( &buf_st.st_mtime );     fprintf( stderr, "MTIME=%10.10d  ->   %2.2d/%2.2d/%2.2d %2.2d:%2.2d:%2.2d  ->%s", <FONT
  size=2>    buf_st.st_mtime, <FONT 
  size=2>    tm_st->tm_mon + 1, tm_st->tm_mday, 
  tm_st->tm_year - 100,     
  tm_st->tm_hour, tm_st->tm_min, tm_st->tm_sec, <FONT 
  size=2>    ctime( &buf_st.st_mtime ) ); 
    tm_st = localtime( &buf_st.st_atime );     fprintf( stderr, "ATIME=%10.10d  ->   %2.2d/%2.2d/%2.2d %2.2d:%2.2d:%2.2d  ->%s", <FONT
  size=2>    buf_st.st_atime, <FONT 
  size=2>    tm_st->tm_mon + 1, tm_st->tm_mday, 
  tm_st->tm_year - 100,     
  tm_st->tm_hour, tm_st->tm_min, tm_st->tm_sec, <FONT 
  size=2>    ctime( &buf_st.st_atime ) ); 
    tm_st = localtime( &buf_st.st_ctime );     fprintf( stderr, "CTIME=%10.10d  ->   %2.2d/%2.2d/%2.2d %2.2d:%2.2d:%2.2d  ->%s", <FONT
  size=2>    buf_st.st_ctime, <FONT 
  size=2>    tm_st->tm_mon + 1, tm_st->tm_mday, 
  tm_st->tm_year - 100,     
  tm_st->tm_hour, tm_st->tm_min, tm_st->tm_sec, <FONT 
  size=2>    ctime( &buf_st.st_ctime ) ); <FONT 
  size=2>  time( &now );   tm_st = 

  localtime( &now );   fprintf( stderr,   "NOW  =%10.10d  -> %2.2d/%2.2d/%2.2d %2.2d:%2.2d:%2.2d    ->%s",     now, <FONT
  size=2>    tm_st->tm_mon + 1, tm_st->tm_mday, 
  tm_st->tm_year - 100,     
  tm_st->tm_hour, tm_st->tm_min, tm_st->tm_sec, <FONT 
  size=2>    ctime( &now ) );   

  now = 0;   tm_st = localtime( &now );     fprintf( stderr, "EPOCH=%10.10d  ->   %2.2d/%2.2d/%2.2d %2.2d:%2.2d:%2.2d  ->%s", <FONT
  size=2>    now,     
  tm_st->tm_mon + 1, tm_st->tm_mday, tm_st->tm_year, <FONT 
  size=2>    tm_st->tm_hour, tm_st->tm_min, 
  tm_st->tm_sec,     ctime( &now ) 

  ); }
  -----Original Message----- From:
  prasad maganti [<A
  href="mailto:prasadm_g_at_yahoo.com">mailto:prasadm_g_at_yahoo.com]   Sent: Friday, July 27, 2001 4:11 AM <FONT   size=2>To: Multiple recipients of list ORACLE-L <FONT   size=2>Subject: Year of Unix file
  Hi dba's
  when i list the unix file (solaris), with ls -lt   command , i am able to see the time, month, date that   is created.
  is there any way to see the year that is created.   any commands....
  prasad.

  Do You Yahoo!? Make international
  calls for as low as $.04/minute with Yahoo! Messenger <FONT   size=2><A target=_blank
  href="http://phonecard.yahoo.com/">http://phonecard.yahoo.com/ Received on Mon Jul 30 2001 - 15:34:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US