Scenario 1:
MAILTO=xyz@example.com
10 12 * * * /usr/local/bin/curator --dry-run --config /home/itadmin/.curator/curator.yml /home/itadmin/.curator/snapshotdaily.yml >> /home/itadmin/.curator/logs.txt 2>&1
By this all the STDOUT and STDERR are going to logs.txt.
Scenario 2 :
If i am using like this :
10 12 * * * /usr/local/bin/curator --config /home/itadmin/.curator/curator.yml /home/itadmin/.curator/snapshotdaily.yml
I am getting mail but not getting stored in logs.txt
What i want is the combination of both 1 and 2: I want my every day logs appeneded to be in logs.txt file for history purpose and also want daily logs to be sent in mail .
| /usr/bin/tee -a /home/itadmin/.curator/logs.txt? What does/usr/bin/teepath mean? – Private May 10 '17 at 12:34/usr/bin/teeor i have to keep/usr/local/bin/tee? – Private May 10 '17 at 12:41which teeto retrieve correct path. – ar_ May 10 '17 at 12:51