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

According to perldoc, I could also check for inode change time with the -C switch. Would this meet my needs?

Have you experimented to see if using the ctime will help you? We don't know anything about your server afterall. I'm guessing that the ctime would work because it doesn't make much sense to preserve inode change time on files uploaded via ftp and the inode of the new file is certainly changed when it is created on the server.

-sauoq
"My two cents aren't worth a dime.";
  • Comment on Re: How long have you been sitting on my server?

Replies are listed 'Best First'.
Re: Re: How long have you been sitting on my server?
by Anonymous Monk on Jan 27, 2003 at 21:23 UTC
    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?

      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!
      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.";