Skip site navigation (1) Skip section navigation (2)

Re: off-topic - list files on linux

From: salman <salmanb(at)quietcaresystems(dot)com>
To: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org, "A(dot)Burbello" <burbello3000(at)yahoo(dot)com(dot)br>
Subject: Re: off-topic - list files on linux
Date: 2008-03-28 17:38:02
Message-ID: 47ED2CFA.4080308@quietcaresystems.com (view raw or flat)
Thread:
Lists: pgsql-admin

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

In response to

Responses

pgsql-admin by date

Next:From: Shane AmblerDate: 2008-03-28 17:45:18
Subject: Re: weird network issue
Previous:From: kevin kempterDate: 2008-03-28 17:18:58
Subject: Re: weird network issue

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group