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)
精彩评论