Post Reply  Post Thread 
/bin/sh: /usr/bin/find: Argument list too long
Author Message
jakob2002
Junior Member
*


Posts: 11
Group: Registered
Joined: Mar 2008
Status: Offline
Reputation: 0
Post: #1
/bin/sh: /usr/bin/find: Argument list too long

Hallo,

seit einigen Tagen erhalte ich per Mail folgenden Cron-Fehler:

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

Inhalt: /bin/sh: /usr/bin/find: Argument list too long

Weiß jemand wo das Problem ist? Der Cron-Eintrag sieht wie folgt aus:

Code:
# 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

[/code]

07-09-2008 05:48 PM
Find all posts by this user Quote this message in a reply
Zothos
Member
****
Dev Team

Posts: 658
Group: Dev Team
Joined: Feb 2007
Status: Offline
Reputation: 7
Post: #2
RE: /bin/sh: /usr/bin/find: Argument list too long

Der Fehler kommt daher das zu viele backups existieren und der find befehl deswegen an seine grenzen stößt.

deswegen rufe den befehl

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


doch mal für jedes verzeichnis in /etc/ispcp manuel auf (dabei den befehl natürlich anpassen). Danach sollte alles wieder rund laufen


Real programmers don't comment their code - it was hard to write, it should be hard to understand

OS : Gentoo 32bit Stage1
ispCP Version : RC4
Mods : Dovecot | Pure-ftpd

No Support via PM - Payed Support via request
07-09-2008 07:24 PM
Find all posts by this user Quote this message in a reply
jakob2002
Junior Member
*


Posts: 11
Group: Registered
Joined: Mar 2008
Status: Offline
Reputation: 0
Post: #3
RE: /bin/sh: /usr/bin/find: Argument list too long

Hm, habs gemacht, aber wenn ich danach wieder it dem Sternchen aufrufe, bekomme ich den gleichen Fehler wieder ....

07-09-2008 07:42 PM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump:

| All rights reserved : isp-control.net |