Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ls/find question

Status
Not open for further replies.

hok1man

Technical User
Feb 16, 2008
102
Hi guys,

just wondering the easy way to find files later than particular timestamp :

ie :
I need to find file *.ksh after 05:05 in directory dir1

I know it might be simple for you..

Thanks guys,
 
Say today is September 11th:

Code:
touch 09110505 /tmp/tempfile
find dir1 -name '*.ksh' -newer /tmp/tempfile
rm /tmp/tempfile

Annihilannic.
 
hmmm.. interesting,
is it working in Solaris 9/10 Anni?

Cheers,
 
Thats the way to do it on Solaris as the Solaris find command does not have the flag

-mmin n
File's data was last modified n minutes ago.


 
Looks like I forgot the -t option. Also to generalise it for any date:

Code:
touch -t $(date +%m%d)0505 /tmp/tempfile



Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top