Find files modified within one hour in HP-UX

空扰寡人 提交于 2019-12-04 21:55:49
Rakshith

Guess this should do

find / -type f -mmin -60

This will be listing files starting from root and modified since the past 60 mins.

the best you can do in HP-UX using the find command is to look for everything that was modified in the last 24 hours. The HP-UX find command only checks modified time in 24-hour increments. This is done by:

find / -type f -mtime 1

This will list all of the filed recursively starting in the root directory that were modified in the last 24 hours. Here's the entry from the man page on the -mtime option:

-mtime n

True if the file modification time subtracted from the initialization time is n-1 to n multiples of 24 h. The initialization time shall be a time between the invocation of the find utility and the first access by that invocation of the find utility to any file specified in its path operands.

If you have the permissions to create the file, use this: touch -t YYYYMMDDHHMM temp

Then use the -newer option find . -newer temp

This should list the files newer than the temp file which can be created one hour ago.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!