oreilly.comSafari Books Online.Conferences.


Reminding Yourself With Linux
Pages: 1, 2

Reminding you when you have to leave

Use the leave tool to remind you when you have to leave (you can get either the Debian package or its original NetBSD sources from here at Give as an argument the time, in 24-hour format, when you have to go.

To remind yourself to leave at 8:05pm, type:

leave 20:05 RET

You'll get a reminder printed on your screen five minutes before the given time, one minute before the time, at the time itself and then every minute subsequently until you log off.

Running a command on a timer

The sleep tool does nothing but wait (or "sleep") for the number of seconds specified as an argument. Use this followed by a ; character (the shell command separator) and another command to run that command after the amount of time you specify. This is useful to run a command at a later time during your current session.

You can use it to send you some kind of reminder in a set amount of time -- like the audio output of the saytime tool, which "speaks" the current time in a human voice. It's available as a Debian package or from its Web site at

Since the shell where you type this command will be unusable until the command you give is executed (or until you interrupt it), type this command in a console or window other than one you might be working in.

To ring the bell in thirty seconds, type:

sleep 30; echo -e '\a'

You can also follow the numeric option with a unit:

s	seconds
m	minutes
h	hours
d	days

To announce the time in exactly five minutes, type:

sleep 5m; saytime & 

Next week: connecting your Linux box to the Internet.

Michael Stutz was one of the first reporters to cover Linux and the free software movement in the mainstream press.

Read more Living Linux columns.

Linux Online Certification

Linux/Unix System Administration Certificate Series
Linux/Unix System Administration Certificate Series — This course series targets both beginning and intermediate Linux/Unix users who want to acquire advanced system administration skills, and to back those skills up with a Certificate from the University of Illinois Office of Continuing Education.

Enroll today!

Linux Resources
  • Linux Online
  • The Linux FAQ
  • Linux Kernel Archives
  • Kernel Traffic

  • Sponsored by: