find mtime 查找距当前时间n天以内修改的文件

find $PATH -mtime 0  查找距当前时间24小时以内修改的文件


     Search  for  files  in  your home directory which have been modified in the last twenty-four hours.  This command works this way because the time since each file was last modified is divided by 24 hours and  any remainder  is  discarded.   That means that to match -mtime 0, a file will have to have a modification in the past which is less than 24 hours ago.

 

find $PATH -mtime +n  查找距当前时间n天以外修改的文件

如n=2     find $PATH -mtime +2 

当前时间11-10 10:00 那么即从距离当前时间(2012-11-10 10:00)的2天前开始算起 find $PATH -mtime +2表示11-07 10:00之前修改过的所有文件都会查找出来,往更早的时间推移,如底下参考鸟哥的时间推移图片

 

find $PATH -mtime -n  查找距当前时间n天以内修改的文件

如n=2     find $PATH -mtime -2 那么即从距离当前时间(2012-11-10 10:00)的2天前开始算起 find $PATH -mtime +2表示11-07 10:00之内修改过的所有文件都会查找出来,往现在的时间推移

 

 

find $PATH  -mtime n 查询距当前时间n天之前24小时以内修改的文件

如n=2 当前时间为2012-11-10 10:00,往前推2天为2012-11-07 10:00,因此以此为时间点,24小时之内的时间为2012-11-07 10:00~2012-11-08 10:00 内修改的文件都会查找出来

 


( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169
Call Stack
#TimeMemoryFunctionLocation
10.0009412392{main}( ).../index.php:0
20.08704262824Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.08704262824Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.309311453808Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.309911478504Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.310511533832Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.310811561232require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.319311960864K2ControllerItem->execute( ).../k2.php:64
90.319311960864K2ControllerItem->display( ).../BaseController.php:710
100.331112611568K2ControllerItem->display( ).../item.php:78
110.331112611568K2ControllerItem->display( ).../controller.php:19
120.337412982608Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.340713002976K2ViewItem->display( ).../ViewController.php:102
140.472415819424K2ViewItem->display( ).../view.html.php:742
150.472415819424K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.477215992360include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
More in this category: « centos 6 epel centos setup »

( ! ) Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478
Call Stack
#TimeMemoryFunctionLocation
10.0009412392{main}( ).../index.php:0
20.08704262824Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.08704262824Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.309311453808Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.309911478504Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.310511533832Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.310811561232require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.319311960864K2ControllerItem->execute( ).../k2.php:64
90.319311960864K2ControllerItem->display( ).../BaseController.php:710
100.331112611568K2ControllerItem->display( ).../item.php:78
110.331112611568K2ControllerItem->display( ).../controller.php:19
120.337412982608Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.340713002976K2ViewItem->display( ).../ViewController.php:102
140.472415819424K2ViewItem->display( ).../view.html.php:742
150.472415819424K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.477215992360include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
back to top