|
Home > Archive > Unix Shell > January 2006 > 'find' with 'millisec' granular level??
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
'find' with 'millisec' granular level??
|
|
| qazmlp1209@rediffmail.com 2006-01-30, 5:56 pm |
| 'find' has the '-newer' option with which the files older/newer than a
specific timestamp can be found out. The timestamp should be of the
format:CCYYMMDDhhmm i.e. the granularity is till minutes only.
Is there any provision to do this operation with the granularity of
millisec? Even fstat() functions do not seem to help here.
| |
| Hubble 2006-01-30, 5:56 pm |
| Most filesystems save time stamps in seconds since the epoch (1.1.70).
So I doubt that there is any possibility to get a granulatity which is
less than seconds.
Hubble.
| |
| Stephane Chazelas 2006-01-30, 5:56 pm |
| On 30 Jan 2006 07:45:43 -0800, Hubble wrote:
> Most filesystems save time stamps in seconds since the epoch (1.1.70).
> So I doubt that there is any possibility to get a granulatity which is
> less than seconds.
[...]
most old systems do, many new systems have granularities up to
the nano second (procfs on Linux, ufs on Solaris, nfs also
supports it...).
The st_mtim is actually a struct timespec on Solaris and on
Linux. Funnily enough, the struct utimbuf used in utime(2)
doesn't have the equivalent, so that touch(1) doesn't actually
work as advertised, and you can't manually set the tv_nsec field
of st_mtim.
--
Stephane
| |
| Barry Margolin 2006-01-31, 2:48 am |
| In article <1138635589.691291.249160@z14g2000cwz.googlegroups.com>,
qazmlp1209@rediffmail.com wrote:
> 'find' has the '-newer' option with which the files older/newer than a
> specific timestamp can be found out. The timestamp should be of the
> format:CCYYMMDDhhmm i.e. the granularity is till minutes only.
> Is there any provision to do this operation with the granularity of
> millisec? Even fstat() functions do not seem to help here.
The -newer option doesn't use a timestamp, it's followed by a filename.
It matches files whose modification times are more recent than the mtime
of the given file.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
|
|
|
|
|