log file
A file a program or scheduled job appends messages to, so you can see later what happened.
In more detail
Logs let you find out what a program did while nobody was watching, such as a scheduled job at night. Append to them rather than overwrite them, and rotate or trim them so they do not fill the disk.
Example
/home/ada/bin/report.sh >> /home/ada/log/report.log 2>&1Related terms
- cron — The Unix and Linux service that runs commands automatically on a schedule, such as every night at two in the morning.
- redirection — Sending a command's output into a file instead of the terminal: > replaces the file, >> appends to the end of it.
- standard output and standard error — The two channels a program writes normal output (stdout) and error messages (stderr) to, plus stdin for input.
Taught in
- Redirection: Truncate, Append, Both Streams — Bash Scripting & Command Line Automation
- find And xargs — Bash Scripting & Command Line Automation
- Scheduling, Monitoring And A Script That Reports — Bash Scripting & Command Line Automation