Problem :
Pipe or output all error or status to a file
Solution :
<command> > myoutputfile.log 2>&1e.g.
/usr/sbin/ntpdate 0.pool.ntp.org >> status.log 2>&1
or
/usr/sbin/ntpdate 0.pool.ntp.org > /dev/null 2>&1
Viola !!!
<command> > myoutputfile.log 2>&1e.g.
/usr/sbin/ntpdate 0.pool.ntp.org >> status.log 2>&1
/usr/sbin/ntpdate 0.pool.ntp.org > /dev/null 2>&1
No comments:
Post a Comment