可以生成最近修改文件列表的脚本

有一个脚本(PHP?),我可以安装(通过FTP),并运行,将给我一个在整个域的特定date后修改的文件列表?

我上次碰到PHP已经有好几年了 ,但是如果我记得正确的话,你可以从中调用一个外部(shell)命令,并吸取结果。 在这个假设下,如果你正在处理的服务器是一个Unix / Linux的服务器,你可以调用“find”命令并让它工作。

基本的语法是: find /your/web/root/here/ -mtime -5 -print如果你想要在过去5天修改的所有文件列表。

只需在该命令周围编写一个PHP包装器(根据需要进行修改)来运行它,并将结果显示在页面上。 我认为应该这样做。

我也build议使用一个PHP包装器和这个基本的shell脚本:

 #!/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