Help: How to store query output in a file !!!

NEERAJ BANSAL <nbansal1@email.mot.com>

From: NEERAJ BANSAL <nbansal1@email.mot.com>
To: pgsql-general@postgresql.org
Date: 2000-06-13T14:37:16Z
Lists: pgsql-general
Does anyone knows how do you send query output to a file???
I tried following but it does not work:
select * from <table name> \o <file name> ;

Please let me know if anyone knows!! Thanks in advance

Neeraj
neeraj_b@hotmail.com