1

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.

j0k
  • 22,600
  • 28
  • 79
  • 90
Vladimir
  • 417
  • 5
  • 20

3 Answers3

3

Guess this should do

find / -type f -mmin -60

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

Jason Plank
  • 2,336
  • 5
  • 31
  • 40
Rakshith
  • 31
  • 2
0

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.

Robert L.
  • 19
  • 4
0

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.