Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 7D1582E004F for ; Fri, 28 Mar 2008 14:38:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 22820-07 for ; Fri, 28 Mar 2008 14:38:03 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from livingmail01.inetu.net (unknown [209.235.247.80]) by postgresql.org (Postfix) with ESMTP id 42E532E0030 for ; Fri, 28 Mar 2008 14:38:04 -0300 (ADT) Received: (qmail 3881 invoked by uid 0); 28 Mar 2008 17:38:02 -0000 Received: from unknown (HELO ?192.168.0.23?) (salmanb@quietcaresystems.com@127.0.0.1) by livingmail01.inetu.net with SMTP; 28 Mar 2008 17:38:02 -0000 Message-ID: <47ED2CFA.4080308@quietcaresystems.com> Date: Fri, 28 Mar 2008 13:38:02 -0400 From: salman User-Agent: Mozilla-Thunderbird 2.0.0.6 (X11/20071009) MIME-Version: 1.0 To: Achilleas Mantzios CC: pgsql-admin@postgresql.org, "A.Burbello" Subject: Re: off-topic - list files on linux References: <871103.54592.qm@web36203.mail.mud.yahoo.com> <20667036.7681206722394920.JavaMail.root@mail.worldcycling.com> In-Reply-To: <20667036.7681206722394920.JavaMail.root@mail.worldcycling.com> Content-Type: text/plain; charset=ISO-8859-7; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.024 tagged_above=0 required=5 tests=AWL=-0.076, RDNS_NONE=0.1 X-Spam-Level: X-Archive-Number: 200803/240 X-Sequence-Number: 28723 Achilleas Mantzios wrote: > Στις Friday 28 March 2008 14:39:53 ο/η A.Burbello έγραψε: >> ls -t1p | grep -v / | grep -v backup | head -1 > > maybe: > ls -t1p | grep -v / | grep -v backup | grep -v `ls -t1p | grep -v / | grep -v backup | head -1` > 1) the -e flag for grep can be used to group strings so you don't have to pipe multiple times (eg: grep -i -e bleh -e bleh2 -e bleh3 -ve backup) 2) wouldn't find be easier to use? find . -maxdepth 1 -type -f -print -salman