Actually, you want to execute that command from your shell prompt (on many Linux systems, this ends with a $ symbol), rather than the MySQL client. It will write the file to whatever directory you are currently logged into, provided that you have write permissions on that directory. You don't have to have access to the real MySQL directory.
Good luck,
brendanc@icehouse.net