How to find the files created within one hour in Solaris?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to find the files created within one hour in Solaris?
# 1  
Old 07-29-2014
How to find the files created within one hour in Solaris?

Hi Gurus,

I want to find the file created within one hour in solaris.
I have tried below command, but it is no lucky.
Code:
 
$find . -mtime -1/24, -name "abc*"

above command give me the file name which created two hours ago
Code:
 
find . -cmin -60, -name "abc*"

above command I got error as below
Code:
 
find: bad option -cmin
find: [-H | -L] path-list predicate-list

anybody can help me out this issue.

thanks in advance.
# 2  
Old 07-29-2014
man find:
Quote:
-cmin n File's status was last changed n minutes ago.
-ctime n True if the file's data was modified n days ago.
-cmin should work. Try dropping the comma.
# 3  
Old 07-29-2014
Quote:
Originally Posted by RudiC
man find: -cmin should work. Try dropping the comma.
Thanks RudiC,

I drop the comma, but I got same error.
Code:
 
 
find . -cmin -60 -name "abc*"
find: bad option -cmin
find: [-H | -L] path-list predicate-list

my OS
Code:
 
SunOS  5.10 Generic_144488-17 sun4v sparc SUNW,SPARC-Enterprise-T5220

any idea.

thanks in advance.
# 4  
Old 07-29-2014
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?
# 5  
Old 07-29-2014
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Command to find files older than 1 hour

Hi, Out of a list of files in a directory, I want to find the files which were created/modified more than 1 hour ago. I am using HP -UNIX and it does not support the argument -mmin. Please advise. I am using # !/bin/sh (4 Replies)
Discussion started by: jhilmil
4 Replies

2. Shell Programming and Scripting

How to compare two file contents which created within one hour?

Hi Gurus, I need to compare two file contents and log the difference. the detail as below: in current directory there is file abc20140728_1020.txt abc20140728_1110.txt I need to find the files which created within 60 minutes first then compare the contents. I am able to use find... (12 Replies)
Discussion started by: ken6503
12 Replies

3. Shell Programming and Scripting

List last 1 hour files with out FIND command

Hi Friends, Can we have an alternate command to list last 1hour files with out FIND command? Thanks Suresh (6 Replies)
Discussion started by: suresh3566
6 Replies

4. UNIX for Dummies Questions & Answers

HP UNIX: How to find files which are older than one hour.

HP Unix Version: HP-UX B.11.31 U ia64 Question I look for script or command to find files which are older than one hour. Tried below; # set the file time to 1 hours ago touch -t 201307160700 ./touchfile find /app/grid/product/11.2.0.3/rdbms/audit -name '*.aud' -type f ! -newer... (4 Replies)
Discussion started by: Siva SQL
4 Replies

5. Shell Programming and Scripting

what is the find to command to find the files created last 30 days

what is the find to command to find the files created last 30 days (5 Replies)
Discussion started by: rajkumar_g
5 Replies

6. UNIX for Dummies Questions & Answers

How to find files created some days before?

HI, I have 2 questions. 1> Is there any code to see files that created some day or some time before in a directory??? 2> how or where i will find the last exit status of a process?? thanks (6 Replies)
Discussion started by: jyotidas
6 Replies

7. Shell Programming and Scripting

Find files modified in last hour sunOS 5.10

trying to find a way to locate files modified in the last hour in a shell script, unfortunately the command 'find . -mmin -60' is not supported on SunOS 5.10 (works on OpenSolaris 5.11 :mad:) Does anyone know a method of doing this in shell script on 5.10? cheers (19 Replies)
Discussion started by: rich@ardz
19 Replies

8. Shell Programming and Scripting

find files created within 30 minutes

find . -name *.txt -mmin -30 This is working in Redhat but not in Solaris.. What is the equivalent option in Solaris? (1 Reply)
Discussion started by: tene
1 Replies

9. UNIX for Dummies Questions & Answers

To create alist of files created in the last 1 hour.

Hi, I need to create a script whcih ill run ever hour and will check all the files which are created in that hour for an error string. Need help in finding all the files which were created in the last 1 hour. Thanks in Advance. Asheesh (4 Replies)
Discussion started by: Asheesh
4 Replies

10. Shell Programming and Scripting

Need to process files created an hour ago

Hello all, I would like to ask for an advice on how to deal with the following scenario. Every now and then, our ERP system creates an interface text file with the following file format - XORD????.DLD where ???? is a sequence number. We can have 1 or more XORD files created in an hour. ... (9 Replies)
Discussion started by: negixx
9 Replies
Login or Register to Ask a Question