buffer space

Norman Mark St. Laurent mstlaurent at conceras.com
Mon Aug 17 19:46:15 UTC 2009


Ok,

For some reason sort -r will not work with sort -t. --key=3,2n options

I tried:

sort -r -t. --key=3,2n
sort -t. -r --key=3,2n
sort -t. --key=3,2n -r

But....

zcat `ls /var/log/audit/*.gz | sort -t. --key=3,2n` | tac | ausearch -i

works like a champ.  Gotta luv linux..

Thnks..


Norman Mark St. Laurent
Conceras | Chief Technology Officer and ISSE
Phone:  703-965-4892
Email:  mstlaurent at conceras.com
Web:  http://www.conceras.com

Connect. Collaborate. Conceras.



Steve Grubb wrote:
> On Monday 17 August 2009 02:46:30 pm Norman Mark St. Laurent wrote:
>   
>> Depending if you are using logrotate.d/audit  and how it numbers the
>> files as it rotates...
>>
>> audit.log.1.gz
>> audit.log.2.gz
>> ...
>> audit.log.89.gz
>> audit.log.90.gz
>>
>> The sort below will but the list in exact order....
>>
>> zcat `ls /var/log/audit/*.gz | sort -t. --key=3,2n` | ausearch -i
>>     
>
> For this to work right, it has to be in descending order. So, add a -r to the 
> sort command.
>
> -Steve
>
>
>   




More information about the Linux-audit mailing list