Re: [expert] logrotate and syslog

2001-08-20 Thread Pierre Fortin

Jose Orlando T. Ribeiro wrote:
 
 Hi!
 
 I have a doubt...
 
 I'm using a LM7.2 machine to store log from some Cisco routers in my network. I
 observed that the logs weren't being rotated nor compressed. So I read the man
 pages and changed the /etc/logrotate.conf, so now the Cisco log files are
 rotated and compressed.
 
 The new problem: when the logs are rotated by logrotate the syslog service
 stops... or at least the part of syslog that should take care of my Cisco's
 logs. Then I have to manually start syslog using the service syslog restart
 command.
 
 Has anybody had the same problem? Knows how to solve???

Mine works fine...  Note that my rotate instructions are not in
/etc/logrotate.conf...

/etc/logrotate.d/syslog contains:

/home/logs/RouterLog {
rotate 5
weekly
postrotate
/usr/bin/killall -HUP syslogd
endscript

HTH,
Pierre



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://.mandrakestore.com



Re: [Fwd: [Fwd: Re: [expert] logrotate and syslog]]

2001-08-16 Thread Jose Orlando T. Ribeiro


Hi Joe!

I looked at the archives, but the bug was about a * in the logrotate.conf
files, that caused already rotated files to be re-compressed and re-rotated...

I still have to service syslog restart manually to restart the syslog after a
logrotate. I think I should have some way to put that command in the end of my
logrotate.conf, but it seems that I can't put commands on it. only commands that
describe how it works (rotate, compress, etc).

Thanks!

orlando

joe smith wrote:
 Content-Type: text/plain;  charset=iso-8859-1
 From: Joe Smith [EMAIL PROTECTED]
 Organization: Entropy Enterprises
 To: Jose Orlando T. Ribeiro [EMAIL PROTECTED]
 Subject: Re: [expert] logrotate and syslog
 
 On Wednesday 15 August 2001 15:49, you wrote:
 
Has anybody had the same problem? Knows how to solve???
 
 Check the archives; there was a well-known glitch with logrotate and syslog.
 
 Joe
 
 .

-- 

,~~v~~,,~~v~~, 
   ,'.   .',  ,'.   .', 
  ===  +  ======  +  === 
   /   ~   \  /   ~   \
  /\_m   m_/\/\_m   m_/\
 .\  +--+  /. 
 /   ! [EMAIL PROTECTED]  !   \  
  /  +--+  \  
   `\m/ \m/'   `\m/ \m/'



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://.mandrakestore.com



Re: [expert] logrotate still stuck

2001-05-29 Thread Stephen Lawrence Jr.

Hmm, the only problem I had on 7.1 servers was in the logrotate.d/syslog
configuration. It was set like this:


/var/log/mail/* {
...
}

which is wrong.

The correct entrie would be:

/var/log/mail/errors {
...
}

/var/log/mail/info {
...
}

etc.etc.etc.



The '/var/log/mail/*' was causing the previously compressed and rotated logs
to be rotated once more, causing a whole slew of rotations of rotations of
rotations of rotations,  etc..

Does this help?


Scott Taylor wrote:

 Hello,

 I have been going through the archives regarding the broken logrotate
 script and see a few that have this same problem, but still can't find the
 fix.  Maybe I missed it.

 So far, I have cleaned out the bad /var/log/mail and news
 directories.  Updated logrotate and slocate and all the rest of LMdk7.1
 updates and still the logrotate proc never stops.  It is only happening on
 one of three 7.1 servers, so I figure something is corrupt, but can't
 figure out what.  Any body have a fix for this?

 In case this helps:  after a few minutes strace on logrotate shows these
 lines over and over like it's in a forever loop:
 19779 mremap(0x4013d000, 606208, 606208, MREMAP_MAYMOVE) = 0x4013d000
 19779 time(NULL)= 991160911

 Thanks.

 --
 Scott Taylor
 Systems Administrator
 DCT Chambers Trucking Ltd.

--
Stephen Lawrence Jr. - Programmer
[EMAIL PROTECTED]
California Animal Health  Food Safety Laboratory System, UC Davis
(530)-752-4614







Re: [expert] logrotate still stuck

2001-05-29 Thread Scott Taylor

At 03:57 PM 05/29/01, Stephen Lawrence Jr. wrote:
Hmm, the only problem I had on 7.1 servers was in the logrotate.d/syslog
configuration. It was set like this:


/var/log/mail/* {
...
}

which is wrong.

The correct entrie would be:

/var/log/mail/errors {
...
}

/var/log/mail/info {
...
}

etc.etc.etc.



The '/var/log/mail/*' was causing the previously compressed and rotated logs
to be rotated once more, causing a whole slew of rotations of rotations of
rotations of rotations,  etc..

Does this help?

Thanks, but I already figured that part out.  I think this problem goes a 
little deeper.  A corrupt file or bad memory or some such.


Scott Taylor wrote:

  Hello,
 
  I have been going through the archives regarding the broken logrotate
  script and see a few that have this same problem, but still can't find the
  fix.  Maybe I missed it.
 
  So far, I have cleaned out the bad /var/log/mail and news
  directories.  Updated logrotate and slocate and all the rest of LMdk7.1
  updates and still the logrotate proc never stops.  It is only happening on
  one of three 7.1 servers, so I figure something is corrupt, but can't
  figure out what.  Any body have a fix for this?
 
  In case this helps:  after a few minutes strace on logrotate shows these
  lines over and over like it's in a forever loop:
  19779 mremap(0x4013d000, 606208, 606208, MREMAP_MAYMOVE) = 0x4013d000
  19779 time(NULL)= 991160911
 
  Thanks.
 
  --
  Scott Taylor
  Systems Administrator
  DCT Chambers Trucking Ltd.

--
Stephen Lawrence Jr. - Programmer
[EMAIL PROTECTED]
California Animal Health  Food Safety Laboratory System, UC Davis
(530)-752-4614

--
Scott Taylor
Systems Administrator
DCT Chambers Trucking Ltd.





Re: [expert] Logrotate question

2001-03-04 Thread Mark Weaver

jarmo wrote:
 
 Hi
 
 I have now lost my red line how logrotate should work.
 Have one comp. running there vers.7.1 of mandrake.
 
 Have updated latest logrotate version from 7.1 updates.
 

Um, can you tell me the name of the package that you used to do this
with?
-- 
Mark

"If you don't share your concepts and ideals, they end up being
worthless,"
"Sharing is what makes them powerful."




Re: [expert] Logrotate question

2001-03-04 Thread jarmo

On Sunday 04 March 2001 15:04, you wrote:
 jarmo wrote:
  Hi
 
  I have now lost my red line how logrotate should work.
  Have one comp. running there vers.7.1 of mandrake.
 
  Have updated latest logrotate version from 7.1 updates.

 Um, can you tell me the name of the package that you used to do this
 with?
Hi Mark

Package is logrotate-3.3-9mdk.i586.rpm

jarmo

PS logrotate-3.5.2 version refuses to install because of old rpm
package.




Re: [expert] logrotate problem

2001-01-30 Thread Laurent Duperval

On 30 Jan, To: Mandrake Expert List wrote:
 Hi,
 
 I've noticed that whenever logrotate is run, it can take more than 2 hours
 to complete. It looks like it's doing something fishy. I'm on LM 7.1 and
 this is the ls -lt |head of /var/log:
 
 -rw-r--r--1 root root 16497976 Jan 30 13:08 debug.log
 drw---2 root root  5914624 Jan 30 13:08 mail/
 -rw---1 root root91056 Jan 30 13:08 messages
 -rw-r--r--1 root root91399 Jan 30 13:08 syslog
 -rw-rw-r--1 root utmp   467712 Jan 30 13:07 wtmp
 -rw---1 root root49106 Jan 30 13:01 cron
 -rw-r--r--1 root root  504 Jan 30 13:00 daemon.log
 -rw---1 root root77890 Jan 30 13:00 sudo.log
 -rw---1 root root0 Jan 30 12:36 secure
 
 As you can see, the *directory* size of mail' is huge! I'm trying to do a ls
 in that directory and it's been running for 20 minutes with no output yet.
 Any ideas why this is happening?
 
 L
 

I'd just like to add that I did a 

ls -f /var/log/mail | wc

and I got a count of more than 101000 files!

L

-- 
MY EMAIL ADDRESS HAS CHANGED -- UPDATE YOUR ADDRESSBOOK

Laurent Duperval   "Montreal winters are an intelligence test,
Netergy Networks - Java Centerand we who are here have failed it."
Phone: (514) 282-8484 ext. 228   -Doug Camilli
mailto:[EMAIL PROTECTED]   Penguin Power!






Re: [expert] logrotate problem

2001-01-30 Thread Vincent Danen

On Tue Jan 30, 2001 at 01:11:20PM -0500, Laurent Duperval wrote:

 I've noticed that whenever logrotate is run, it can take more than 2 hours
 to complete. It looks like it's doing something fishy. I'm on LM 7.1 and
 this is the ls -lt |head of /var/log:

You haven't upgraded the logrotate rpm available in the 7.1 updates
yet, have you?  Upgrade that and your logrotate problems will go away,
but you will still need to clean out your /var/log/mail and
/var/log/news directories.  Best method might be to "rm -rf {news,mail}" 
from your /var/log directory and recreate the directories.

-- 
[EMAIL PROTECTED], OpenPGP key available on www.keyserver.net
1024D/FE6F2AFD   88D8 0D23 8D4B 3407 5BD7  66F9 2043 D0E5 FE6F 2AFD
 - Danen Consulting Serviceswww.danen.net, www.freezer-burn.org
 - MandrakeSoft, Inc. Security  www.linux-mandrake.com

Current Linux uptime: 3 days 18 hours 54 minutes.




Re: [expert] logrotate problem

2001-01-30 Thread Laurent Duperval

On 30 Jan, Vincent Danen wrote:
 On Tue Jan 30, 2001 at 01:11:20PM -0500, Laurent Duperval wrote:
 
 I've noticed that whenever logrotate is run, it can take more than 2 hours
 to complete. It looks like it's doing something fishy. I'm on LM 7.1 and
 this is the ls -lt |head of /var/log:
 
 You haven't upgraded the logrotate rpm available in the 7.1 updates
 yet, have you?  Upgrade that and your logrotate problems will go away,

Ok, thanks.

 but you will still need to clean out your /var/log/mail and
 /var/log/news directories.  Best method might be to "rm -rf {news,mail}" 
 from your /var/log directory and recreate the directories.
 

Yep, that's what I'm doing now.

L

-- 
MY EMAIL ADDRESS HAS CHANGED -- UPDATE YOUR ADDRESSBOOK

Laurent Duperval   "Montreal winters are an intelligence test,
Netergy Networks - Java Centerand we who are here have failed it."
Phone: (514) 282-8484 ext. 228   -Doug Camilli
mailto:[EMAIL PROTECTED]   Penguin Power!






Re: [expert] logrotate problem

2001-01-30 Thread Daniel Woods

  You haven't upgraded the logrotate rpm available in the 7.1 updates
  yet, have you?  Upgrade that and your logrotate problems will go away,
 
 Ok, thanks.

And be sure to run MandrakeUpdate to get ALL the latest updates.
Or do it manually and ftp all the rpms that have been
updated since you installed LM7.1 for programs that you use.

Chances are that if you have not been doing that, you may have already
had your server cracked by script kiddies... especially with the RameN Crew
worm out this month.
I discovered one university library server affected by this worm
because the person responsible never did any RPM updates.

Thanks... Dan.






Re: [expert] logrotate problem

2001-01-30 Thread Laurent Duperval

On 30 Jan, Daniel Woods wrote:
  You haven't upgraded the logrotate rpm available in the 7.1 updates
  yet, have you?  Upgrade that and your logrotate problems will go away,
 
 Ok, thanks.
 
 And be sure to run MandrakeUpdate to get ALL the latest updates.
 Or do it manually and ftp all the rpms that have been
 updated since you installed LM7.1 for programs that you use.
 

THat's what I'm doing. One thing that scares me a bit, though, is that a
warning came up in Mandrake Update saying "Don't update this package using
Mandrake Update" but I wasn't given an option of sckipping that particular
package (a kernel, I think).

Hopefully I won't crash too hard.

 Chances are that if you have not been doing that, you may have already
 had your server cracked by script kiddies... especially with the RameN Crew
 worm out this month.

I doubt it. I'm on a laptop behind a firewall and I don't have telnet or ftp
or rlogin or sshd or httpd or most of those daemons running.

L

-- 
MY EMAIL ADDRESS HAS CHANGED -- UPDATE YOUR ADDRESSBOOK

Laurent Duperval   "Montreal winters are an intelligence test,
Netergy Networks - Java Centerand we who are here have failed it."
Phone: (514) 282-8484 ext. 228   -Doug Camilli
mailto:[EMAIL PROTECTED]   Penguin Power!






Re: [expert] logrotate problem

2001-01-30 Thread John J. LeMay Jr.

** Reply to message from Laurent Duperval [EMAIL PROTECTED] on
Tue, 30 Jan 2001 13:40:28 -0500 (EST)


 I'd just like to add that I did a 
 
 ls -f /var/log/mail | wc
 
 and I got a count of more than 101000 files!


I get this quite often myself. I typically blow out the directories before I go
to bed and in the am I recreate them.

John LeMay Jr.
Senior Enterprise Consultant
NJMC, LLC.


[tag] I love deadlines. I like the whooshing sound they make as they fly by.  - 
Douglas Adams




Re: [expert] logrotate problem

2001-01-30 Thread Tib

I've had this problem as well, with the news and mail folders. What I've
noticed is that in both of those folders, the logs are stored as 'news.crit,
mail.warn, etc' and have no .log extension - and I think this is causing
problems, because you'll end up with things like
'mail.info.1.gz.1.gz.2.gz.2.gz.1.gz.1.gz.1.gz.etc' - this is where the mass
quantities of files comes from. The flaw in this logic is that there are a
couple log files in the /var/log/ directory that DON'T have this problem even
though they don't have a .log extension... [shrug]. Best thing to do I guess is
update the rpm as people have noted.. it's what I'm doing. :]

EOL
Tib

On Tue, 30 Jan 2001, Laurent Duperval wrote:

 Hi,
 
 I've noticed that whenever logrotate is run, it can take more than 2 hours
 to complete. It looks like it's doing something fishy. I'm on LM 7.1 and
 this is the ls -lt |head of /var/log:
 
 -rw-r--r--1 root root 16497976 Jan 30 13:08 debug.log
 drw---2 root root  5914624 Jan 30 13:08 mail/
 -rw---1 root root91056 Jan 30 13:08 messages
 -rw-r--r--1 root root91399 Jan 30 13:08 syslog
 -rw-rw-r--1 root utmp   467712 Jan 30 13:07 wtmp
 -rw---1 root root49106 Jan 30 13:01 cron
 -rw-r--r--1 root root  504 Jan 30 13:00 daemon.log
 -rw---1 root root77890 Jan 30 13:00 sudo.log
 -rw---1 root root0 Jan 30 12:36 secure
 
 As you can see, the *directory* size of mail' is huge! I'm trying to do a ls
 in that directory and it's been running for 20 minutes with no output yet.
 Any ideas why this is happening?
 
 L
 
 





Re: [expert] logrotate problem

2001-01-30 Thread Vincent Danen

On Tue Jan 30, 2001 at 03:35:49PM -0800, Tib wrote:

 I've had this problem as well, with the news and mail folders. What I've
 noticed is that in both of those folders, the logs are stored as 'news.crit,
 mail.warn, etc' and have no .log extension - and I think this is causing
 problems, because you'll end up with things like
 'mail.info.1.gz.1.gz.2.gz.2.gz.1.gz.1.gz.1.gz.etc' - this is where the mass
 quantities of files comes from. The flaw in this logic is that there are a
 couple log files in the /var/log/ directory that DON'T have this problem even
 though they don't have a .log extension... [shrug]. Best thing to do I guess is
 update the rpm as people have noted.. it's what I'm doing. :]

No, the file name has absolutely nothing to do with it.  Once you
upgrade logrotate, you'll notice the file names are the same yet the
problem is gone.  The problem is with logrotate, not the logs
themselves.

-- 
[EMAIL PROTECTED], OpenPGP key available on www.keyserver.net
1024D/FE6F2AFD   88D8 0D23 8D4B 3407 5BD7  66F9 2043 D0E5 FE6F 2AFD
 - Danen Consulting Serviceswww.danen.net, www.freezer-burn.org
 - MandrakeSoft, Inc. Security  www.linux-mandrake.com

Current Linux uptime: 4 days 7 hours 29 minutes.




Re: [expert] logrotate

2000-10-24 Thread turgut kalfaoglu

On Fri, 20 Oct 2000 09:24:52 -0600, Vincent Danen wrote:
Yeah, use an ftp client (ncftp, etc.) and connect to a mirror,
download the updates, then run "rpm -Fvh *.rpm" and upgrade the
packages.  Very easy.


Oh, thanks. I tried ftp.mandrake.com, found NOTHING, not even
a text file of explanations, so I was baffled. I'll try one of its
mirrors..  thanks, -turgut



EgeNet Internet Services:  http://www.egenet.com.tr
Find all of Turkey online:  http://find.egenet.com.tr





Keep in touch with http://mandrakeforum.com: 
Subscribe the "[EMAIL PROTECTED]" mailing list.



Re: [expert] logrotate

2000-10-20 Thread Turgut Kalfaoglu


On Thu, 19 Oct 2000, Ron Johnson, Jr. wrote:
[root@db2 mail]# rm *
bash: /bin/rm: Argument list too long
 Divide and conquer:
 rm [Aa]*
 rm [Bb]*
 rm [Cc]*

I wrote a C program that would create a batch to do just that:
  rm mail.err.%d.gz.%d.gz.%d.gz.%d.gz*
where each %d goes from 1 to 9.. If I reduce it by 1 %d.gz, I get the
Argument List too long. It's naturally quite inefficient, takes hours to
run. I was hoping there was a Unix utility that would delete all files
without first expanding the parameters..  

=turgut

-
Turgut Kalfaoglu, EgeNet Internet Services http://www.egenet.com.tr
All of Turkey Online: http://find.egenet.com.tr




Keep in touch with http://mandrakeforum.com: 
Subscribe the "[EMAIL PROTECTED]" mailing list.



Re: [expert] logrotate

2000-10-20 Thread Larry Marshall

  rm [Aa]*
  rm [Bb]*
  rm [Cc]*
 
 I wrote a C program that would create a batch to do just that:
   rm mail.err.%d.gz.%d.gz.%d.gz.%d.gz*
 where each %d goes from 1 to 9.. If I reduce it by 1 %d.gz, I get the

I didn't notice the front end of this thread so I'm not sure what's going
on but this looks like a dandy place for a Perl script.  The problem is I
don't know where these files are located.  But just to hint at a solution

ls | myscript.pl

with 

@files = STDIN

will generate an array of file names.  You can then grab them one at a
time, do anything you want to change their names, and then execute the rm
command.
 
 Argument List too long. It's naturally quite inefficient, takes hours to
 run. I was hoping there was a Unix utility that would delete all files
 without first expanding the parameters..  

This hints that you're overrunning the bounds of rm with
filenames.  Again, a perl script might help.  If nothing else you can
stick those rm [Aa]*, rm [Bb]* commands into a single shell script.  No
need to get fancy I should think.  Sorry if I've completely misunderstood
the goal.

Cheers --- Larry







Keep in touch with http://mandrakeforum.com: 
Subscribe the "[EMAIL PROTECTED]" mailing list.



RE: [expert] logrotate

2000-10-20 Thread turgut kalfaoglu

On Thu, 19 Oct 2000 14:45:33 -0400, Bill Shirley wrote:
rm -Rf /var/log/news /var/log/mail
mkdir -m 755 /var/log/news /var/log/mail

Many thanks Bill and others for helping out!
Two servers are now happy, with a cron job 
to delete all files from the mail and news directories.

Of course, that is not a cure; does anyone know how 
servers without X can use MandrakeUpdate, or how
else can I patch these servers?

Thanks, -turgut



EgeNet Internet Services:  http://www.egenet.com.tr
Find all of Turkey online:  http://find.egenet.com.tr





Keep in touch with http://mandrakeforum.com: 
Subscribe the "[EMAIL PROTECTED]" mailing list.



Re: [expert] logrotate

2000-10-20 Thread Vincent Danen

On Fri Oct 20, 2000 at 03:19:00PM +0300, turgut kalfaoglu wrote:

 On Thu, 19 Oct 2000 14:45:33 -0400, Bill Shirley wrote:
 rm -Rf /var/log/news /var/log/mail
 mkdir -m 755 /var/log/news /var/log/mail
 
 Many thanks Bill and others for helping out!
 Two servers are now happy, with a cron job 
 to delete all files from the mail and news directories.

You really don't want to do this...  There is no need to make a cron
job to do this if you upgrade to the latest logrotate and sysklogd
from updates.
 
 Of course, that is not a cure; does anyone know how 
 servers without X can use MandrakeUpdate, or how
 else can I patch these servers?

Yeah, use an ftp client (ncftp, etc.) and connect to a mirror,
download the updates, then run "rpm -Fvh *.rpm" and upgrade the
packages.  Very easy.

-- 
[EMAIL PROTECTED], OpenPGP key available on www.keyserver.net
// Danen Consulting Serviceswww.danen.net, www.freezer-burn.org
// MandrakeSoft, Inc.   www.linux-mandrake.com
1024D/FE6F2AFD   88D8 0D23 8D4B 3407 5BD7  66F9 2043 D0E5 FE6F 2AFD

Current Linux uptime: 3 days 10 hours 27 minutes.



Keep in touch with http://mandrakeforum.com: 
Subscribe the "[EMAIL PROTECTED]" mailing list.



Re: [expert] logrotate

2000-10-20 Thread Asheesh Laroia

On Fri, 20 Oct 2000, Turgut Kalfaoglu wrote:
 I wrote a C program that would create a batch to do just that:
   rm mail.err.%d.gz.%d.gz.%d.gz.%d.gz*

Can you email me the source to this?

I'm starting to learn C++ and C, and I can't understand how to do system
calls.

Thanks a bundle!

-- Asheesh.




Keep in touch with http://mandrakeforum.com: 
Subscribe the "[EMAIL PROTECTED]" mailing list.



Re: [expert] logrotate

2000-10-19 Thread Jim Holthaus

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 19 Oct 2000, Turgut Kalfaoglu wrote:
 
 Let's assume that you have successfully ignored the patches,
 and announcements, and ended up with a system (Mandrake 7.1)
 that has over 5 MILLION files on its /var/log/mail and /news directories.
 
 Let's also assume that when you type:
   [root@db2 mail]# rm *
 you get:
   bash: /bin/rm: Argument list too long
 
 any ideas what you can do to save your servers? :)

Use find to delete the files one at a time. This will take a while, but it'll
get the job done. Here is a sample find command that might do the trick for
/var/log/mail:

find /var/log/mail -ctime +3 -exec rm {} \;
- -- 
Jim Holthaus   (pronunciation: HOLT house)
[EMAIL PROTECTED]
PGP Public Key at http://www.holthaus.com/jim/pgpkey.html
Learn about PGP at http://www.holthaus.com/jim/pgp.html

-BEGIN PGP SIGNATURE-
Version: PGP 6.5.1

iQA/AwUBOe8Pun3IcJJ+eC/CEQJZBACg4OBND3URjBUZEv26Wy1Q3kCLO/oAnAjm
zCERmPkgX23ixqfe3cFeWRKM
=rm6t
-END PGP SIGNATURE-



Keep in touch with http://mandrakeforum.com: 
Subscribe the "[EMAIL PROTECTED]" mailing list.



Re: [expert] logrotate

2000-10-19 Thread J.A. Magallon

Turgut Kalfaoglu said at Ò[expert] logrotateÓ.
[2000-10-19 17:06]

 Let's assume that you have successfully ignored the patches,
 and announcements, and ended up with a system (Mandrake 7.1)
 that has over 5 MILLION files on its /var/log/mail and /news directories.

 Let's also assume that when you type:
   [root@db2 mail]# rm *
 you get:
   bash: /bin/rm: Argument list too long

 any ideas what you can do to save your servers? :)

Try with 'xargs' (man xargs), it is just for that.
Also you could try also inside /var/log/ with find:
find . -exec rm -f {} \;
This second solution can be MUCH slower...




Keep in touch with http://mandrakeforum.com: 
Subscribe the "[EMAIL PROTECTED]" mailing list.



Re: [expert] logrotate

2000-10-19 Thread Ron Johnson, Jr.

Turgut Kalfaoglu wrote:
 
 Let's assume that you have successfully ignored the patches,
 and announcements, and ended up with a system (Mandrake 7.1)
 that has over 5 MILLION files on its /var/log/mail and /news directories.
 
 Let's also assume that when you type:
   [root@db2 mail]# rm *
 you get:
   bash: /bin/rm: Argument list too long
 
 any ideas what you can do to save your servers? :)
 
 Thank you!
   -turgut
 
 PS: 5 million files is an estimate.
 
 -

Divide and conquer:
rm [Aa]*
rm [Bb]*
rm [Cc]*
etc., etc.

Ron
-- 
+--+
| Ron Johnson, Jr.Home: [EMAIL PROTECTED] |
| Jefferson, LA  USA  WWW : [EMAIL PROTECTED] |
| http://ronandheather.dhs.org |
+--+



Keep in touch with http://mandrakeforum.com: 
Subscribe the "[EMAIL PROTECTED]" mailing list.



Re: [expert] logrotate

2000-10-19 Thread gene

At 6:06 PM +0300 10/19/00, Turgut Kalfaoglu wrote:
Let's assume that you have successfully ignored the patches,
and announcements, and ended up with a system (Mandrake 7.1)
that has over 5 MILLION files on its /var/log/mail and /news directories.

Let's also assume that when you type:
   [root@db2 mail]# rm *
you get:
   bash: /bin/rm: Argument list too long

any ideas what you can do to save your servers? :)

This should work.  The syntax is for tcsh, but it should be similar in bash:

# tcsh
# foreach foo (*)
# /bin/rm $foo
# end
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
   smalltime industries bringing you the latest in
   interplanetary transport technology, interactive
   web games, dada, art, poetry and pants.
   www.smalltime.com  .. visit early and often
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



Keep in touch with http://mandrakeforum.com: 
Subscribe the "[EMAIL PROTECTED]" mailing list.



Re: [expert] logrotate

2000-10-19 Thread Vincent Danen

On Thu Oct 19, 2000 at 06:06:12PM +0300, Turgut Kalfaoglu wrote:

 Let's assume that you have successfully ignored the patches,
 and announcements, and ended up with a system (Mandrake 7.1)
 that has over 5 MILLION files on its /var/log/mail and /news directories.
 
 Let's also assume that when you type:
   [root@db2 mail]# rm *
 you get:
   bash: /bin/rm: Argument list too long
 
 any ideas what you can do to save your servers? :)

Wouldn't:

rm -rf /var/log/mail; mkdir /var/log/mail

work?

-- 
[EMAIL PROTECTED], OpenPGP key available on www.keyserver.net
// Danen Consulting Serviceswww.danen.net, www.freezer-burn.org
// MandrakeSoft, Inc.   www.linux-mandrake.com
1024D/FE6F2AFD   88D8 0D23 8D4B 3407 5BD7  66F9 2043 D0E5 FE6F 2AFD

Current Linux uptime: 2 days 12 hours 44 minutes.



Keep in touch with http://mandrakeforum.com: 
Subscribe the "[EMAIL PROTECTED]" mailing list.



RE: [expert] logrotate

2000-10-19 Thread Bill Shirley

rm -Rf /var/log/news /var/log/mail
mkdir -m 755 /var/log/news /var/log/mail

It works, been there, done that.

Bill


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Ron Johnson, Jr.
 Sent: Thursday, October 19, 2000 11:38 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [expert] logrotate
 
 
 Turgut Kalfaoglu wrote:
  
  Let's assume that you have successfully ignored the patches,
  and announcements, and ended up with a system (Mandrake 7.1)
  that has over 5 MILLION files on its /var/log/mail and 
 /news directories.
  
  Let's also assume that when you type:
[root@db2 mail]# rm *
  you get:
bash: /bin/rm: Argument list too long
  
  any ideas what you can do to save your servers? :)
  
  Thank you!
-turgut
  
  PS: 5 million files is an estimate.
  
  -
 
 Divide and conquer:
 rm [Aa]*
 rm [Bb]*
 rm [Cc]*
 etc., etc.
 
 Ron
 -- 
 +--+
 | Ron Johnson, Jr.Home: [EMAIL PROTECTED] |
 | Jefferson, LA  USA  WWW : [EMAIL PROTECTED] |
 | http://ronandheather.dhs.org |
 +--+
 
 




Keep in touch with http://mandrakeforum.com: 
Subscribe the "[EMAIL PROTECTED]" mailing list.