Thank you, Bob. Very helpful information on all fronts. > Anthony (Tony) Esposito > Senior Technical Consultant > Inovis(tm) > 2425 N. Central Expressway, Suite 900 > Richardson, TX 75080 > (972) 643-3115 > [EMAIL PROTECTED] >
-----Original Message----- From: Bob Showalter [mailto:[EMAIL PROTECTED] Sent: Thursday, July 17, 2003 11:31 AM To: Tony Esposito; [EMAIL PROTECTED] Subject: RE: trying to delete a file if >= 1 day old Tony Esposito wrote: > Fellow Perl neophytes ( and non-neophytes), > I need a little clarification. I am trying to remove files that are > greater that 24 hours old. The code snippet below is in a 'while' > loop that steps through a directory, yet it seems not to work - no > files are removed no matter what their 'age' ( i.e., their creation > time ). See below... > I have stepped through the code via the Perl debugger and > know the code is being executed. > > unlink $file unless -C $file < 1; -C is expressed in "days ago, since start of program". So -C < 1 means "less than 1 day ago". > > Another question - is the creation time of a file > 'updated' whenever > a 'write' to the file is performed or does the creation time remain > static? Neither. There is no such thing as "creation" time (on Unices anyway). -C gives you days since last inode change. Typically, you use -M, which is days since last modification of the file contents. > I need a way to delete files based on the file creation time > and that time needs to be static. No can do, since file creation time isn't kept anywhere. See http://www.faqs.org/faqs/unix-faq/faq/part3/section-1.html > One last - unrelated - query: Does anyone know of a Oracle PL/SQL > mailing list ( e.g., [EMAIL PROTECTED] )? I dunno. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]