The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 08-26-2008
odd_r odd_r is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 1
Compare date of file and directory

I need to compare the changedate of a file and a directory in a shellscript. If the changedate of the directory is the same or newer than the file, I will execute a certain command. If not, I have to wait a second and then compare the dates again. Is this possible?

Thanks.