Forum Moderators: bakedjake
There are several ways you could go about doing that. I'm assuming you're using a cron job -- a line in your crontab specifying a regular interval to perform the command "cat check.txt >> /usr/bin/allchecks.txt ".
The simplest way would be to change that line so that it executes both the cat command and the 'date' command, which should output the date and time. You could change the line to "cat check.txt >> /usr/bin/allchecks.txt ; date >> /usr/bin/allchecks.txt"
Note that the semicolon tells the shell executing the command to execute two commands, one after the other. So 'date' will run just after 'cat' finishes.
Another way you could do it would be to create a simple bash script (or perl script, or whatever) that would execute 'cat' and 'date' for you, and run the bash script from the cron job.
One last note -- the directory "/usr/bin/" is intended for general programs, not for logfiles. It might be more "proper" to output the logfile somewhere else, maybe your home directory.