We have a policy for our ftp server that prohibits people from leaving files for over 30 days on our server. So I came up with a Perl script that checks the age of the file and deletes the file if it's age is over 30 days.
The problem is that I am checking $mtime. And if someone has a file, which is over 30 days old, and uploads it to the server, the file is deleted immediately. What I need to know is how long that file has been on the server, not its $mtime. Would $atime help? I don't think so. According to perldoc, I could also check for inode change time with the -C switch. Would this meet my needs? I am not sure, and I hope someone has any ideas. Thanks!
In reply to How long have you been sitting on my server? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |