开发者

Find files modified within one hour in HP-UX

开发者 https://www.devze.com 2023-04-05 11:59 出处:网络
I\'开发者_如何学Gom searching through the manual page for find I can\'t see a way to run a command which will find all files modified within an hour. I can see only a way to do it for days.Guess this

I'开发者_如何学Gom searching through the manual page for find I can't see a way to run a command which will find all files modified within an hour. I can see only a way to do it for days.


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.

0

精彩评论

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