When I redirect the output of some commands to a file using the greater-than symbol as described, some messages are still sent to the console. Why?
A1:
You're seeing standard error messages, rather than standard output messages. Standard error messages are meant to inform you that something out of the ordinary has happened. To redirect standard error messages, append a 2> to the end of the command, followed by the name of the file that should hold the error messages.
Q2:
Is there any way to simply throw away the standard output or standard error messagesfor instance, if I want a command to behave "silently"?
A2:
Yes, redirect one or both to the special device file /dev/null, which is commonly known as the bit bucket. All data sent to the file /dev/null is discarded by the system.