K
K
karter2011-11-22 21:42:46
FreeBSD
karter, 2011-11-22 21:42:46

Making crontab write messages to the FreeBSD console?

Actually not even a question, but an answer. Maybe someone will come in handy. Well, since it's stupid to write this in posts, I'll leave it in q&a.
The problem is in the title. After killing the whole evening looking for a solution, searching the Internet, I found only this: echo "hello"> / dev / tty1
Where tty1 is your console. But it wasn’t there, I didn’t try it in Linux, but it doesn’t work in Fre.
This is where the most interesting thing began - the trial and error method :)
And the solution was nearby: echo "hello"> / dev / console
Well, another question, after outputting to the console, the system waits for Enter to be pressed.
What needs to be done to immediately display the interpreter prompt?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sniks, 2011-11-23
@sniks

Let me ask you in what cases do you need to output cron to the console?
Typically, console output is either suppressed by redirecting to dev/null or redirected to a file.
I use mail redirect 2>&1 | mail -s "message" [email protected]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question