问题
I'm 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.
回答1:
Guess this should do
find / -type f -mmin -60
This will be listing files starting from root and modified since the past 60 mins.
回答2:
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.
回答3:
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.
来源:https://stackoverflow.com/questions/7441646/find-files-modified-within-one-hour-in-hp-ux