|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
crontab in AIX
Hi all, i am trying to reduce the file size of /var/adm/wtmp in my AIX servers and im using the method cp /dev/null /var/adm/wtmp to reduce it. I thought of automating it by including this command into crontab. Surprisingly, it doesn't work once i put into crontab, there is no error message thrown out, no messages, no output in fact it seems as though that command was not executed at all. How come? I tried typing manually the command and it works it only doesn't work in crontab. Any suggestion?
|
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
Please give an example of the entry from the crontab. I bet it is because you are not using the absolute path of cp as in /usr/bin/cp.
|
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
I tried with full path and it doesnt work too. By the way the command i use is:
1 * * * * /usr/bin/cp /dev/null /var/adm/wtmp THe reason i let it run every minute is because at this moment i want to monitor hence a 1 minute wait is the most appropriate. |
|
#4
|
|||
|
|||
|
No wonder /usr/bin/cp /dev/null > /var/adm/wtmp
|
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
I am wrong now disregard my last entry!
|
| Sponsored Links | |
|
|
#6
|
|||
|
|||
|
Try /usr/bin/cat /dev/null > /var/adm/wtmp
|
| Sponsored Links | |
|
|
#7
|
|||
|
|||
|
How come i need to add the > but via command line i do not need to use that? How often will it update the log file for cron? Once i've modified i do not see it in the /var/adm/cron/log file immediately. It still doesn't work after i did that:
1 * * * * /usr/bin/cp /dev/null > /var/adm/wtmp |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Crontab help plz | chakkaravarthy | Shell Programming and Scripting | 2 | 12-15-2010 05:13 AM |
| Crontab and PHP help | Sidabm | Shell Programming and Scripting | 8 | 12-31-2009 04:04 PM |
| crontab | Pouchie1 | Shell Programming and Scripting | 3 | 12-20-2009 01:17 AM |
| Crontab | RAFC_99 | UNIX for Dummies Questions & Answers | 4 | 11-30-2009 05:17 PM |
| ftp and crontab | user` | Shell Programming and Scripting | 27 | 11-13-2006 07:02 PM |
|
|