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

Mr. Muskrat has already answered your question directly

mtime and atime do not tell me how long the file has been on the server. ctime or the inode change time represents the time when the file's meta-information last changed. So ctime also doesn't tell me how long the file has been on the server.

Just thinking off the top of my head here: Could I come up with a script that logs any uploaded file in a database or textfile? The script would have to record the file the instant it gets uploaded. How could I do this if we are using ftp to do the uploading? (This idea isn't perfect, since the user could always rename the file, but whatelse could i do? . . .)

  • Comment on Re: Re: How long have you been sitting on my server?

Replies are listed 'Best First'.
Re: Re: Re: How long have you been sitting on my server?
by Anonymous Monk on Jan 27, 2003 at 19:39 UTC
    A simple yet sloppy fix would be to have your script create a .txt file, named the same as you upload file. Since it is created at time of upload have your script check the $mtime of the txt file and if it is 30 days old delete filename.* I like the hash answer much better, though.