The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
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 05-19-2002
AkumaTay AkumaTay is offline
Registered User
  
 

Join Date: Jul 2001
Location: Malaysia
Posts: 21
compare files acess time

I need to compare x file with y file.
If x file is newer than y file do xxxx;
(I used touch -t yymmddxxx to chnage the time for y file)

How can i do that?

I tried use
if [ $x -ot $y ]
then
echo "Xxx";;
fi

But cant....any other good ways to do it?