The UNIX and Linux Forums  

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 -->
  #3 (permalink)  
Old 11-12-2005
pete_leon pete_leon is offline
Registered User
  
 

Join Date: Oct 2005
Posts: 2
find and copy -mtime -newer cp

this was the code I came up with and it does not work.

Any suggestions are much appreciated.

#!/usr/bin/ksh

Path=/home/test1
Path2=/home/test2

if find -mtime $Path -newer $Path2
then cp $Path $Path2

fi