Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 344872E00CB for ; Mon, 31 Mar 2008 03:49:10 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 82404-07 for ; Mon, 31 Mar 2008 03:49:06 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from smadev.internal.net (host3.dynacom.ondsl.gr [62.103.35.211]) by developer.postgresql.org (Postfix) with ESMTP id 5D3B02E00CA for ; Mon, 31 Mar 2008 03:49:09 -0300 (ADT) Received: from smadev.internal.net (localhost [127.0.0.1]) by smadev.internal.net (8.14.2/8.14.2) with ESMTP id m2V6n6TW046804; Mon, 31 Mar 2008 09:49:06 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Received: from localhost (localhost [[UNIX: localhost]]) by smadev.internal.net (8.14.2/8.14.2/Submit) id m2V6n5XW046803; Mon, 31 Mar 2008 09:49:05 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: pgsql-admin@postgresql.org Subject: Re: off-topic - list files on linux Date: Mon, 31 Mar 2008 08:49:04 +0200 User-Agent: KMail/1.9.7 Cc: salman , "A.Burbello" References: <871103.54592.qm@web36203.mail.mud.yahoo.com> <20667036.7681206722394920.JavaMail.root@mail.worldcycling.com> <47ED2CFA.4080308@quietcaresystems.com> In-Reply-To: <47ED2CFA.4080308@quietcaresystems.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200803310949.05356.achill@matrix.gatewaynet.com> X-Archive-Number: 200803/267 X-Sequence-Number: 28750 =D3=F4=E9=F2 Friday 28 March 2008 19:38:02 =EF/=E7 salman =DD=E3=F1=E1=F8= =E5: >=20 > Achilleas Mantzios wrote: > > =D3=F4=E9=F2 Friday 28 March 2008 14:39:53 =EF/=E7 A.Burbello =DD=E3=F1= =E1=F8=E5: > >> ls -t1p | grep -v / | grep -v backup | head -1 > >=20 > > maybe: > > ls -t1p | grep -v / | grep -v backup | grep -v `ls -t1p | grep -v / | g= rep -v backup | head -1` > >=20 >=20 > 1) the -e flag for grep can be used to group strings so you don't have=20 > to pipe multiple times (eg: grep -i -e bleh -e bleh2 -e bleh3 -ve backup) >=20 > 2) wouldn't find be easier to use? find . -maxdepth 1 -type -f -print >=20 I tried to give an example, using *only* primitives that already existed in= the original question. > -salman >=20 =2D-=20 Achilleas Mantzios