[SunHELP] Sheel Script need

baki sunhelp at sunhelp.org
Thu Feb 1 05:10:10 CST 2001


Thank you very much
    ls -rt |grep -v `ls -rt |tail -1`
this works as what i want


----- Original Message -----
From: "Trond Eirik Aune" <trond.eirik.aune at ttyl.com>
To: <sunhelp at sunhelp.org>
Sent: Thursday, February 01, 2001 12:46 PM
Subject: RE: [SunHELP] Sheel Script need


> I am not sure if i understand you correctly, but if you want to find all
the
> files except the last/newest (and maybe active) file:
>
> ls -rt (list all files, recent files last |tail -1
>
> That will give you the newest file. IF you want all files except that one:
>
> ls -rt |grep -v `ls -rt |tail -1`
>
> Hope this is what you wanted
>
>
>
> -----Original Message-----
> From: sunhelp-admin at sunhelp.org [mailto:sunhelp-admin at sunhelp.org]On
> Behalf Of baki
> Sent: 1. februar 2001 10:57
> To: sunhelp at sunhelp.org
> Subject: [SunHELP] Sheel Script need
>
>
> i have a problem. What can i do is i find all files in a directory except
> the last one
> because it is active
>
> #ls
> tserver.010201.090430  tserver.010201.101801  tserver.010201.111441
> tserver.010201.092518  tserver.010201.102716  tserver.010201.112505
> tserver.010201.093847  tserver.010201.103633  tserver.010201.113526
> tserver.010201.094908  tserver.010201.104549  tserver.010201.114441
> tserver.010201.095929  tserver.010201.105505
> tserver.010201.100846  tserver.010201.110420
>
> tserver.010201.114441 is active file
> so  we need the
>
> tserver.010201.090430  tserver.010201.101801  tserver.010201.111441
> tserver.010201.092518  tserver.010201.102716  tserver.010201.112505
> tserver.010201.093847  tserver.010201.103633  tserver.010201.113526
> tserver.010201.094908  tserver.010201.104549
> tserver.010201.095929  tserver.010201.105505
> tserver.010201.100846  tserver.010201.110420
>
> HOW CAN I DO THIS?
> _______________________________________________
> SunHELP maillist  -  SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp
>
>
> _______________________________________________
> SunHELP maillist  -  SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp
>



More information about the SunHELP mailing list