Do you mean save the output of an executable, such as the MAGMA testers? Use a shell redirect, > .
./testing_zgetrf > file.txt
Beyond that basic use, the syntax depends on your shell. See the sh (bash) or csh (tcsh) man pages for more information, or any introduction to UNIX book or tutorial.