Current time: 11-26-2024, 11:09 AM Hello There, Guest! (LoginRegister)


Post Reply 
/bin/sh: root: command not found
Author Message
grungy Offline
Junior Member
*

Posts: 190
Joined: Dec 2006
Reputation: 6
Post: #1
/bin/sh: root: command not found
I am getting following mails from the Cron daemon:

Code:
Cron <root@ns3> root find /etc/ispcp/*/backup/* -maxdepth 0 -type f -mtime +7 -print | egrep '.*\.[0-9]+$' | xargs /bin/rm


/bin/sh: root: command not found
/bin/rm: missing operand
Try `/bin/rm --help' for more information.

I am using trunk-20071125
(This post was last modified: 11-27-2007 09:31 PM by grungy.)
11-27-2007 09:31 PM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #2
RE: /bin/sh: root: command not found
Hi grungy

could you post the line in /etc/cron.d/ispcp which matches the line above?
Should look like this

@daily root find /etc/ispcp/*/backup/* -maxdepth 0 -type f -mtime +7 -print | egrep '.*\.[0-9]+$' | xargs -r /bin/rm

the "-r" after xargs was added later - it prevents the second error message (rm: missing operand)

what OS do you use?

/J
11-27-2007 09:45 PM
Visit this user's website Find all posts by this user Quote this message in a reply
grungy Offline
Junior Member
*

Posts: 190
Joined: Dec 2006
Reputation: 6
Post: #3
RE: /bin/sh: root: command not found
Code:
# Backup
@daily root /var/www/ispcp/engine/backup/ispcp-backup-all yes &>/var/log/ispcp/ispcp-backup-all-mngr.log
@daily root /var/www/ispcp/engine/backup/ispcp-backup-ispcp noreport &>/var/log/ispcp/ispcp-backup-all-mngr.log

# Remove config backups older than seven days
@daily root find /etc/ispcp/*/backup/* -maxdepth 0 -type f -mtime +7 -print | egrep '.*\.[0-9]+$' | xargs -r /bin/rm

# Remove Daemon Logs older than 14 days (except .gz files)
@daily root find /var/log/ispcp/* -maxdepth 1 -type f -mtime +14 -print | egrep '.*\.gz$' | xargs -r /bin/rm

Code:
cat /etc/debian_version
4.0
(This post was last modified: 11-27-2007 09:49 PM by grungy.)
11-27-2007 09:48 PM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #4
RE: /bin/sh: root: command not found
hm - looks fine.

and debian etch should know the interval "@daily" so I don't know why you got this error...

you could copy the line and set a fix time in front:
Code:
0 13 * * * root find /etc/ispcp/*/backup/* -maxdepth 0 -type f -mtime +7 -print | egrep '.*\.[0-9]+$' | xargs -r /bin/rm

to run the cronjob at 13 o'clock...
and then look in the log...

/J
11-27-2007 09:56 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)