开发者

Executing find command for geting all the files modified after a date

I have use开发者_运维知识库d shell find command for listing all the files in a directory.It is working fine.I want to list all the files that are modified after a specified date i have used this command

$command='touch -date "2010-01-18" /home;find.-newer /home ';
$Getfile = exec($command,$ret,$output);

But it is not working .Thanks in advance


Find all files modified after specific date in current directory

$command='touch -t 201001180000 /tmp/timestamp; find . -type f -newer /tmp/timestamp'


You can use directory for find, however, the suggested syntax is --

find ABSOLUTE_PATH -newer /home -type f

. is current working directory,
(in web environment could be refer to DOCUMENT_ROOT + REQUEST_URI)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜