[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] [Raq4r] how can I remove ALL the logfiles from ALL vsites ? PLEASE HELP
- Subject: RE: [cobalt-users] [Raq4r] how can I remove ALL the logfiles from ALL vsites ? PLEASE HELP
- From: "Jens-Peter Otto" <jp.otto@xxxxxxxxxxxxxxx>
- Date: Wed Mar 12 07:58:00 2003
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
On Wed, 12 Mar 2003 15:56:12 +0100, Bob Lenaerts wrote:
> Thank you
>
> This worked, but somethimes the server comes up with :
>
> sh: /bin/rm: Argument list too long
>
> How comes ??
>
> Any other thing to do ?
>
the shell parses the arguments and "extracts" the wildcards. When there are too many files or paths that match the wildcard, you get what you mention above.
Just give the command twice with "site[01234]*" and "site[56789]*" or do it with find -exec
find /home/sites/site*/web/stats -name "*usage*" -exec rm -f {} \;
but you might want to change the "-exec" to "-ok" which prompts you for every command or at least give it a first shot with ls instead of rm ;-)
Jens-Peter