|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
An expression term lacks a required parameter.
I'm trying to get a cron job to run on AIX 5.2 but I keep getting the a message about it lacking a required parameter. Below is what shows when run from the command line which is the same as in the cron job. I added in the second \ on a sugestion I found on another site but with only one it still does not work and gives the same error from the cron job but running with only one \ from the command line does not give an error, but does not remove the files either.
Does anyone have any ideas on what else I could try. /usr/bin/find /u01/arch/PRD6 -name "*.log" -atime +7 -exec /sbin/rm {} \\; find: 0652-018 An expression term lacks a required parameter. |
|
#2
|
|||
|
|||
|
are you trying to pipe the results of the search to the rm command and have them all removed? Where is the pipe? I am not that familiar with AIX.. but it appears as if you are giving everything including the rm command as parameters to the find command.
-Steven |
|
#3
|
|||
|
|||
|
That is what its supposed to do. But looking through the man file for find there is an example of:
10. To find and remove every file in your home directory with the .c suffix, type: find /u/arnold -name "*.c" -exec rm {} \; Every time the find command identifies a file with the .c suffix, the rm command deletes that file. The rm command is the only parameter specified for the -exec expression. The {} (braces) represent the current path name. looks to me as if this should take care of it. Bruce |
|
#4
|
|||
|
|||
|
It's the asterisk.
Try: Code:
/usr/bin/find /u01/arch/PRD6 -name \*.log -atime +7 -exec /sbin/rm -f {} \\;
|
|
#5
|
|||
|
|||
|
nope still getting the lacks a required parameter from the command line. This is driving me crazy. It should be so simple. I guess I could just pay for support call to IBM, because something has to be screwy with this version of AIX. Every resource I've found does not seem to work.
![]() |
|
#6
|
|||
|
|||
|
Well maybe I'm on to a little something this works
find /u01/arch/PRD6 -name '*.log' -mtime +5 -exec rm {} \; Not sure why atime will not and mtime does. I'm goign to stick it in the cron and see what happens in a couple of days after I get some more log files built up. I also went to the single quote which seems to make a difference too. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > An expression term lacks a required parameter. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|