The commands described below need to be entered while logged in to the Unix server. Normally you'll see a prompt ending with $ when the command interpreter (or shell) is ready for another command.
Use the command sequence
command > filename
This makes command send its output to filename.
To append output to an existing file, use
command >> filename
For example, to list of all your files, storing the list in a file called files.txt, give the command
ls -lt > files.txt
This technique is called redirection.
Please suggest an improvement
(login needed, link opens in new window)
Your views are welcome and will help other readers of this page.