The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
option followed by : taking next option if argument missing with getopts gurukottur Shell Programming and Scripting 2 03-17-2008 08:46 AM
No Password - - Setuid Only Option in Solaris 10 leond UNIX for Dummies Questions & Answers 1 08-24-2007 07:57 AM
find with prune option highlt UNIX for Advanced & Expert Users 11 01-04-2007 07:29 AM
-s option to find object exists not working. markjason Shell Programming and Scripting 2 10-18-2006 11:06 AM
Solaris C compiler option -Xc BCarlson High Level Programming 3 07-20-2006 07:47 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-11-2008
Registered User
 

Join Date: Feb 2008
Posts: 4
Stumble this Post!
AIX to SOLARIS conversion - (find -cmin option)

I have a piece of code (below) in a .ksh script running on AIX. I need to convert the code to run .zsh on Solaris. Solaris's find command does not support the -cmin function. Suggestions??

The code searchs for a file (_filename) and determines if it has been written to or modified in the last 5 minutes. If it has, it goes to sleep for 5 minutes and then checks again.

Code:
LOOP=1
  while [ ${LOOP} -eq 1 ]
  do
    find . -cmin -5 -name ${_filename} | read NEW_FILE
    if [ ! -z ${NEW_FILE} ]
    then
      echo "INFO: preprocess_dc: Time index "`date`". The file ${_filename} is less than five minutes old."
      echo "INFO: preprocess_dc: Waiting $vSleepTime seconds to verify the file is not still being written."
      sleep $vSleepTime
    else
      LOOP=0
    fi
  done

Last edited by Yogesh Sawant; 06-11-2008 at 10:20 PM. Reason: added code tags
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:26 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0