in reply to Re: How long have you been sitting on my server?
in thread How long have you been sitting on my server?

Have you experimented to see if using the ctime will help you?

It might. But I'm not sure what it's recording. I had someone ftp an old file to the server, I then typed:

perl -e "print -C 'somefile'"

And the results were: 0.0172916666666667
I then tried it again, and now the output was: 0.0216666666666667

What's happening here exactly?

Replies are listed 'Best First'.
Re: Re: Re: How long have you been sitting on my server?
by sauoq (Abbot) on Jan 27, 2003 at 22:42 UTC
    What's happening here exactly?

    The same thing that happens with -M and -A. They provide the age in days since the script started. If you want seconds since the epoch, you'll need stat(). Looking at your output, it does look like ctime should work for you.

    -sauoq
    "My two cents aren't worth a dime.";
    
Re: Re: Re: How long have you been sitting on my server?
by bart (Canon) on Jan 27, 2003 at 22:36 UTC
    That must be the "age" of the file, in days, since the start of the script. The values you got would be in the neighbourhood of 1/2 hour. Ladies and gentlemen, it looks like we've got a winner!