Hi there, I decided that it would be a good idea to 'touch' the file immediately after creating it and changing the modified date to the current date, however its just not working for me.

change file permissions and 'touch' the file:

system("chmod 777 "filepath/filename");
system(touch -m "filepath/filename");


attempt to read back the new modified date.

open(HANDLE, $FILE);
my $date_modified = localtime( (stat HANDLE)[9] );


Any ideas why this isn't working?


Cheers in advance for anything.

G :)

Public Sub House()

On Error Resume drink

        If Pint.empty = True Then
                Pint.refill
  Else
                Pint.drink
        End if

stomach.add Pint

MsgBox " I've had .... " & stomach.count & " Pints"
MsgBox "VERY DRUNK"

End Sub





From: "Tom Phoenix" <[EMAIL PROTECTED]>
To: "Graeme McLaren" <[EMAIL PROTECTED]>
CC: beginners@perl.org
Subject: Re: date & time from server problem/question
Date: Thu, 11 May 2006 10:43:09 -0700
MIME-Version: 1.0
Received: from lists.develooper.com ([63.251.223.186]) by bay0-mc3-f3.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 11 May 2006 10:43:25 -0700
Received: (qmail 5281 invoked by uid 514); 11 May 2006 17:43:22 -0000
Received: (qmail 5268 invoked from network); 11 May 2006 17:43:22 -0000
Received: from x1a.develooper.com (HELO x1.develooper.com) (216.52.237.111) by lists.develooper.com with SMTP; 11 May 2006 17:43:22 -0000
Received: (qmail 28500 invoked by uid 225); 11 May 2006 17:43:21 -0000
Received: (qmail 28494 invoked by alias); 11 May 2006 17:43:20 -0000
Received: pass (x1.develooper.com: domain of [EMAIL PROTECTED] designates 64.233.166.181 as permitted sender) Received: from py-out-1112.google.com (HELO py-out-1112.google.com) (64.233.166.181) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Thu, 11 May 2006 10:43:14 -0700 Received: by py-out-1112.google.com with SMTP id t32so294954pyc for <beginners@perl.org>; Thu, 11 May 2006 10:43:09 -0700 (PDT) Received: by 10.35.91.15 with SMTP id t15mr1431715pyl; Thu, 11 May 2006 10:43:09 -0700 (PDT)
Received: by 10.35.83.6 with HTTP; Thu, 11 May 2006 10:43:09 -0700 (PDT)
X-Message-Info: LsUYwwHHNt2WeWFCz+RPZ2TVNSPAWEnDbSUKzOd1b0E=
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Post: <mailto:beginners@perl.org>
List-Help: <mailto:[EMAIL PROTECTED]>
List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
List-Subscribe: <mailto:[EMAIL PROTECTED]>
List-Id: <beginners.perl.org>
Delivered-To: mailing list beginners@perl.org
Delivered-To: beginners@perl.org
X-Spam-Status: No, hits=-2.6 required=8.0tests=BAYES_00,DK_SIGNED,DK_VERIFIED,SPF_PASS
X-Spam-Check-By: la.mx.develooper.com
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=FhLtX8qLJEWlJeZp9z94FIyETj0ziW9Kc/x8312eg+8n82rdtnXS1YOdLVpuo9XGRUaykrC1OnCVd7dGHNhTZ2piowsGYz60ccyLDOAyvMfOareYs3XMKrZ/U4hfY7ANTUXpFziXEq5Cwg3O0KqP0YhFR0GLudJ4H1XETrkmuG8=
References: <[EMAIL PROTECTED]>
X-Google-Sender-Auth: dfce7076203d905a
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 11 May 2006 17:43:26.0571 (UTC) FILETIME=[684AD3B0:01C67522]

On 5/11/06, Graeme McLaren <[EMAIL PROTECTED]> wrote:

Hi all, I'm trying to get the date & time a file was created on the server,
I RTFM and I found:

10 ctime    inode change time (NOT creation time!) in seconds since
the epoch

It looks as if you've found the correct FM. There are three timestamps
(on most Unix-like filesystems, at least), but none of them is the
creation time. So, you can't get what you're asking for; sorry.

If you really need to know a file's creation time, the second thing to
do is to keep that information on file somewhere, probably at the time
you create the file. The first thing to do is to decide exactly what
you mean by "creating" a file. Does making a copy count? If you
replace a file with a backup copy, does it now have the timestamp of
the backup? If you replace the hard drive on the server, do all the
files have new creation times? If I make a new document based upon a
template created in 1996, when was the new document created? If I make
a new template based upon that template, does it have a different
creation date than if I merely edit the template? If I upload a file
to your server, what creation date does it get? Are we talking about
the creation of the file, or the creation of the data it contains? Are
we talking about the creation of the data, or the publication of the
data? What is the creation timestamp actually going to be used for,
and will it be useful for that purpose? Be precise, be consistent,
show your work, and continue on the reverse side of the paper if
necessary.

Good luck with it!

--Tom Phoenix
Stonehenge Perl Training

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>





--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to