1

Is there a script (PHP?) that I can install (via FTP) and run that will give me a listing of the files that are modified AFTER a particular date on the entire domain?

MadHatter
  • 78,442
  • 20
  • 178
  • 229
Robin Rodricks
  • 540
  • 2
  • 10
  • 27

2 Answers2

2

It's been years since I've last touched PHP, but if I recall correctly you can call an external (shell) command from it, and suck in the results. Under that assumption, if the server you're dealing with is a Unix/Linux box, you could call out to the 'find' command and let it do the work.

The basic syntax would be: find /your/web/root/here/ -mtime -5 -print if you wanted a list of all files modified in the last 5 days.

Just write a PHP wrapper around that command (modified as needed) to run it and display the results on a page for you. I think that should do the trick.

Christopher Cashell
  • 8,999
  • 2
  • 31
  • 43
0

I also suggest to use a PHP wrapper and this basic shellscript:

#!/bin/sh
# find all files newer then "2012-10-31 12:09"    
touch -d "2012-10-31 12:09" /tmp/reference
find /path/to/observe -newer /tmp/reference > /path/to/webserver/modified.files
ThorstenS
  • 3,084
  • 18
  • 21