Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Linux Ask!

Sep 062011
 

Select a document in MongoDB

Answer:

To select (find) a document in MongoDB, you can use the following syntax in the mongodb Interactive shell.

use my_db
db.users.find({name:"peter"})

You need to switch to the current database (e.g. my_db) and then execute your select statement.

Aug 312011
 

Debug and verify Postfix configurations

Answer:

A simple way to debug and verify your Postfix configurations is the use the sendmail command with the -bv flag.

Example:

# sendmail -bv [email protected]

No email will be sent using the above command, it just report after verifying each recipient address. This is very useful for testing the Postfix configurations.