|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
find -mtime giving strage results in HP-UX
Hi,
I am using HP-UX B.11.23 U ia64 I am trying to retrieve files using -mtime option of find command However I found that -mtime is not giving correct results Following is the output of commands executed on 03-Dec-2009 It can be seen that -mtime +1 should have returned all files from "Dec 2" backwards However it is listing files from "Nov 26" backwards Similarly -mtime +1 should have returned all files from "Nov 26" backwards instead the command is listing files "Nov 24" backwards What could be the reason? Does -mtime starts with last day of last month backwards in HP-UX? Thanks and Regards, Chetana Quote:
Last edited by Chetanaz; 12-03-2009 at 06:38 AM.. Reason: formatting |
| Sponsored Links | ||
|
|
|
#2
|
|||
|
|||
|
First off - mtime +1 finds files that are > 86400 seconds (1 days worth of seconds) older than RIGHT NOW, not 1 "day" older as us humans view the calendar.
So the results you get will depend upon 1. the actual mtime of the file 2. what time of day you run find relative to the filetime. That said I don't see why you do not get files from Dec 1 and Nov 30. And no, to the best of my knowledge find on 11.23 is not broken, nor is it in need of a patch. Are these files mounted on a remote machine - in another time zone or on a box with a time drift problem?? mtime uses epoch seconds as mtime stored in the directory file -- not what you see in the ls -l display. |
|
#3
|
|||
|
|||
|
Many Thanks Jim!
Those files were on SAN!! Now tested on local drive, but still results are strange as can be seen below : Quote:
Thanks and Regards, Chetana |
| Sponsored Links | ||
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| awk script giving unstable results | Anteus | Shell Programming and Scripting | 10 | 08-14-2009 02:24 AM |
| egrep not giving desired results | igandu | Shell Programming and Scripting | 3 | 11-14-2007 03:43 AM |
| find . -mtime | topcat8 | UNIX for Dummies Questions & Answers | 1 | 04-26-2006 10:55 AM |
| Script giving wrong results.... | mgirinath | Shell Programming and Scripting | 1 | 12-21-2005 08:45 PM |
| find -mtime off by one day? | ceanntrean | UNIX for Dummies Questions & Answers | 4 | 08-24-2005 07:46 PM |