LinuxDevCenter.com

oreilly.comSafari Books Online.Conferences.

We've expanded our Linux news coverage and improved our search! Search for all things Linux across O'Reilly!

Search
Search Tips

advertisement

Listen Print Subscribe to Linux Subscribe to Newsletters

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 debian.org). 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 acme.com.

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.




Tagged Articles

Be the first to post this article to del.icio.us

Sponsored Resources

  • Inside Lightroom
Advertisement

Sponsored by:

O'Reilly Media

©2009, O'Reilly Media, Inc.
(707) 827-7000 / (800) 998-9938
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
About O'Reilly
Academic Solutions
Authors
Contacts
Customer Service
Jobs
Newsletters
O'Reilly Labs
Press Room
Privacy Policy
RSS Feeds
Terms of Service
User Groups
Writing for O'Reilly
Content Archive
Business Technology
Computer Technology
Google
Microsoft
Mobile
Network
Operating System
Digital Photography
Programming
Software
Web
Web Design
More O'Reilly Sites
O'Reilly Radar
Ignite
Tools of Change for Publishing
Digital Media
Inside iPhone
O'Reilly FYI
makezine.com
craftzine.com
hackszine.com
perl.com
xml.com

Partner Sites
InsideRIA
java.net
O'Reilly Insights on Forbes.com