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!

AIX alternative to mmin or amin

Status
Not open for further replies.

Sambo8

Programmer
May 10, 2005
78
0
0
NZ
Hi there,

I want to know if a file exists that has been touched in the last 30 mins. mmin and amin do not work on the server so I was trying to touch a file and find a file if it was newer than that file as follows:

find /u01/sam/test/hello.txt -newer timelastrun.txt echo "no error"

but I get the following:

find: missing conjunction

Any ideas or help?

many thanks,
Sam
 
You can't just put an echo command on the end of the find command-line.

Try something like:

Code:
if find /u01/sam/test/hello.txt -newer timelastrun.txt  > /dev/null
then
    echo "no error"
else
    echo "no new files found!"
fi

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top