Tuesday, January 18, 2011

Linux standard output

# Mail the output of the job to another user.
command | mail -s "Subject: Output of job" user
 
# Standard output redirected to a file.
command >> file.log
 
# Standard output and standard error redirected to a file.
command >> logfile 2>&1
 
# Throw all the output away.
command >> /dev/null 2>&1

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home