Search | Running | Sailfish OS | All Posts | About Me

Playing with the cal UNIX utility

July 25, 2024 — Nico Cartron

I wanted to quickly check which day of the week a specific date in August would be, and didn't want to open iCal or my work laptop's Outlook.
Since I was in a terminal, I just typed "cal" and hit tab to autocomplete:

√ ~ % cal   
cal        calendar   callbootd
  • CALENDAR(1) reads a file and wasn't what I was looking for
  • however, CAL(1) did exactly what I wanted:
    • when just invoking it, it will display the current month (in my case, July 2024)
    • issuing cal MONTH YEAR is what I wanted:
√ % cal august 2024   
    August 2024   
Su Mo Tu We Th Fr Sa   
             1  2  3   
 4  5  6  7  8  9 10   
11 12 13 14 15 16 17   
18 19 20 21 22 23 24   
25 26 27 28 29 30 31   

BOOM - in just a few seconds, I was able to find what I needed.

It still amazes me that I keep discovering new UNIX utilities :-)


Tags: IT


I don't have any commenting system, but email me (nicolas at ncartron dot org) your comments!
If you like my work, you can buy me a coffee!