Community discussions

MikroTik App
 
reza.mnp
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 90
Joined: Mon Jun 11, 2007 9:44 am
Location: ilam - iran
Contact:

What is the problem the following script

Mon May 07, 2012 8:30 pm

What is the problem the following script?
 :for i from=1 to=1500  do={ /tool user-manager log remove number=$i; } 

run but no delete log file

usermanager v4.17
 
User avatar
skot
Long time Member
Long time Member
Posts: 584
Joined: Wed Nov 30, 2011 3:05 am

Re: What is the problem the following script

Tue May 08, 2012 12:05 am

Do you want to delete only logs 1-1500? Or all of them?

If you want to delete all the logs, do:
/tool user-manager log remove [find];
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: What is the problem the following script

Fri May 11, 2012 11:43 am

you can check the output of [find] and see what numbers are expected there.

your initial script would work if you did print before remove. That would add temporary numbering that is assigned when print is done.
 
User avatar
skot
Long time Member
Long time Member
Posts: 584
Joined: Wed Nov 30, 2011 3:05 am

Re: What is the problem the following script

Fri May 11, 2012 10:15 pm

your initial script would work if you did print before remove. That would add temporary numbering that is assigned when print is done.
After doing the print command, how long are the numbers associated with the items? Is there a timeout of some kind, or how does that work?