Current time: 05-04-2024, 05:36 AM Hello There, Guest! (LoginRegister)


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

Posts: 27
Joined: Mar 2008
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 Offline
Release Manager
*****
Dev Team

Posts: 1,262
Joined: Feb 2007
Reputation: 10
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
07-09-2008 07:24 PM
Find all posts by this user Quote this message in a reply
jakob2002 Offline
Junior Member
*

Posts: 27
Joined: Mar 2008
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 


Forum Jump:


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