Hi Gurus,
I want to find the file created within one hour in solaris.
I have tried below command, but it is no lucky.
$find . -mtime -1/24, -name "abc*"
above command give me the file name which created two hours ago
find . -cmin -60, -name "abc*"
above command I got error as below
find: bad option -cmin
find: [-H | -L] path-list predicate-list
anybody can help me out this issue.
thanks in advance.
RudiC
July 29, 2014, 3:15pm
2
man find:
-cmin should work. Try dropping the comma.
Thanks RudiC,
I drop the comma, but I got same error.
find . -cmin -60 -name "abc*"
find: bad option -cmin
find: [-H | -L] path-list predicate-list
my OS
SunOS 5.10 Generic_144488-17 sun4v sparc SUNW,SPARC-Enterprise-T5220
any idea.
thanks in advance.
RudiC
July 29, 2014, 3:48pm
4
I'm not a Solaris user, but did you try /usr/bin/find
or /usr/xpg4/bin/find
? Or, did you read the man page searching for valid expressions?
The -cmin
primary in find
is an extension to the standards that is not supplied by Solaris find
utilities. The -mtime
primary takes integral numbers of days and does not perform arithmetic on its operands.
This is already being addressed in another thread. Look at message #6 in How to comare two file contents which created within one hour?
This thread is closed.