in reply to Re: Easy way to Remove Files if match condition time?
in thread Easy way to Remove Files if match condition time?

Get the creation time of each file with stat.
See if the difference between now and the ctime is greater than (60 * 60 * 24 ).
Ahem, ctime is the inode modification time, not the creation time. UNIX at least, doesn't record that information.

Dave.

  • Comment on Re^2: Easy way to Remove Files if match condition time?

Replies are listed 'Best First'.
Re^3: Easy way to Remove Files if match condition time?
by friedo (Prior) on Feb 05, 2005 at 00:43 UTC
    You're right, but as these were described as temp files it's probably safe to bet that they were created once and not modified after. I should have been more clear about that though.
      your probably right, the file would be created once only.