UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
  #1  
Old July 3rd, 2004, 03:42 PM
dynamicvb dynamicvb is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 45 dynamicvb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 40 m
Reputation Power: 4
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.

Reply With Quote
  #2  
Old July 3rd, 2004, 04:31 PM
stevengs stevengs is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Germany
Posts: 394 stevengs User rank is Lance Corporal (50 - 100 Reputation Level)stevengs User rank is Lance Corporal (50 - 100 Reputation Level)stevengs User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 3 Days 4 h 36 m 24 sec
Warnings Level: 10
Number of bans: 1
Reputation Power: 0
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

Reply With Quote
  #3  
Old July 4th, 2004, 07:29 PM
dynamicvb dynamicvb is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 45 dynamicvb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 40 m
Reputation Power: 4
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

Reply With Quote
  #4  
Old July 6th, 2004, 09:15 AM
jim mcnamara jim mcnamara is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jun 2004
Posts: 1,299 jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 8 h 41 m 52 sec
Reputation Power: 47
It's the asterisk.
Try:
Code:
/usr/bin/find /u01/arch/PRD6 -name \*.log -atime +7 -exec /sbin/rm -f {} \\;

Reply With Quote
  #5  
Old July 6th, 2004, 09:13 PM
dynamicvb dynamicvb is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 45 dynamicvb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 40 m
Reputation Power: 4
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.

Reply With Quote
  #6  
Old July 6th, 2004, 09:38 PM
dynamicvb dynamicvb is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 45 dynamicvb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 40 m
Reputation Power: 4
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > An expression term lacks a required parameter.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway