Monthly Archives: August 2013

Listing files with absolute paths

In some cases, there is a need to list files with absolute paths rather than just the filename as done by ls. This can be done using the following command:

find `pwd` -iname '*.txt'

This solution uses find to search for files within the directory provided by pwd which is the current directory. This creates a list of files with absolute paths. You can use any search commands that find support.

Air purifier

Ernest's allergies are acting up again. So I thought to buy the Sharp air purifiers to be placed in his room to help his allergies. We got a Sharp FU-A28E which has a HEPA filter and an ionizer for the kids room and a small car ioniser G-DC2E for the car.

The room unit seems to be rather quiet at its lowest speed but it rather loud like a normal fan at its highest. It has 3 settings and we typically put it on low for the night. Not sure wthere it helps but it is rather inexpensive at $149 so it is worth a try.

The car unit is more for the air quality and it seems to work ok. One nice feature is that once plugged into the cigarette lighter plug, it starts up once power is received much like the Garmin GPS. That is really a nice thought.

Recursive queries

I have always been amazed by Oracle's connect by query construct which enables recursive queries. I use quite a bit of graphs in my work and representing and using them with a database has been less than ideal. I just realized that PostgreSQL and SQL Server are also able to do this using Common Table Expression (CTE). This is really useful stuff. Link to PostgreSQL and SQL Server documentation as follows:

http://msdn.microsoft.com/en-us/library/ms186243%28v=sql.105%29.aspx

http://www.postgresql.org/docs/8.4/static/queries-with.html