Monday, February 25, 2013

list files in the past x minutes

find . -maxdepth 1 -mmin -1000 -ls

**BE CAREFUL not to forget the dash before the interval value

postgres date and time query

Postgres saves times in UTC to do a query using the server timezone use the below
select caller_aor,callee_aor,start_time AT TIME ZONE 'UTC' from cdrs where  and start_time > '2013-02-22 00:00:00' AT TIME ZONE 'UTC';