/ factorpad.com / tech / linux-essentials / calendar-command.html
An ad-free and cookie-free website.
Beginner
Learn to manage a team calendar at the Linux command line.
Videos can also be accessed from the Linux Essentials Playlist on YouTube.
Linux calendar Command Summary with Examples (3:31)
Our forty-first word, or command to memorize is
calendar
from our category
System.
calendar
allows you to display
reminders and calendar updates.
-options | description |
---|---|
-A num |
Print calendar forward from today to num days |
-B num |
Print calendar from today back num days |
-a |
Mail calendar results to all users |
Recall that we just finished a set of 10 video (tutorials) on text
processing, ending with full-blown programming-like commands like
grep
and
sed
, so you deserve a break with an
easy topic like calendar
.
Before we start, it helps to think of commands as mini programs and
most follow this structure:
command -option(s) argument(s)
.
The calendar
command has
8 options, and no arguments.
Unlike most commands, help isn't available with double-dash
--help
, so I suggest using the
man calendar
command for
documentation. The default is today and tomorrow with weekends
lumped together. With -A
you can
change this default to a different number of days, and
-B
allows you to look back in time.
A system administrator can use the -a
option to send calendar items to all users via email.
So why is calendar
an important command?
Well, it is important for everyone to be kept on the same page, of the
calendar that is.
And now you know how to do that.
Okay, the best way to embed this in your memory is by typing in your own terminal window.
Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows.
Here we go. Let's do a
calendar
optionless.
And it reports historical events today and one day forward by default.
Next, let's do an ls
directory
listing in
/usr/share/calendar
to see the
different calendars available.
And if you're particularly nationalistic or religious you do have a few choices here.
And last, let's throw in a -B
option
and look back one day too.
Okay now you know how to use calendar
.
And you know the syntax for commands, options and arguments.
One last tip about the calendar
command.
So yes, some organizations do create and distribute custom calendars;
however, most I know do try to keep it light-hearted and fun.
Okay, thanks for visiting today. I hope this was a helpful
introduction to the calendar
command.
For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:
Don't lose track of this growing career resource, subscribe and follow now. 1) YouTube, 2) Twitter or 3) email list.
sed
command,
hit Back.cal
,
click Next./ factorpad.com / tech / linux-essentials / calendar-command.html
A newly-updated free resource. Connect and refer a friend today.