UsingMac.com

Mac Tricks and Tips, Wallpapers and Applications for Mac Users

Fun with Terminal

Advertisements

Indeed, there are many easter eggs inside your Terminal, but I believe these Terminal command lines will make you smile as it's really fun to play around with. And for some, I am sure you've never seen them before.

Birth Token

cat /usr/share/misc/birthtoken | grep [month]

This Terminal command line will show you what is the birth flower and birth stone for the given birth month, instantly.

$cat /usr/share/misc/birthtoken | grep Jan
January:Garnet:Carnation

Meaning of Flowers

cat /usr/share/misc/flowers | grep -i [flower-name]

Do you know that Camelia means reflected loveliness? Terminal knows it.

$cat /usr/share/misc/flowers | grep -i Clover
Clover:Be mine.

Milestones in Music

cat /usr/share/calendar/calendar.music | grep [month/date]

Show you the date of birth of milestones in music related to the given month and date parameter.

$cat /usr/share/calendar/calendar.music | grep 01/10
01/10	Blues guitarist Howlin' Wolf dies in Chicago, 1976
01/10	Jim Croce is born in Philadelphia, 1943
01/10	Pat Benatar is born in Long Island, 1952
01/10	Rod Stewart is born in Glasgow, Scotland, 1945

Proper Names

cat /usr/share/dict/propernames | grep [portion-of-name]

This command line, if executed, will return you completed names from the give portion of name. Whether it's proper or not, I doubt.

$cat /usr/share/dict/propernames | grep Te
Ted
Teresa
Teri
Teriann
Terrance
Terrence
Terri
Terry
Teruyuki

Birthdays

cat /usr/share/calendar/calendar.birthday | grep [month/date]
cat /usr/share/calendar/calendar.birthday | grep [name]

This particular Terminal command line will show you the birthdays of some famous people. Not so breaking though, I can't even find Steve Jobs and Bill Gates birthdays inside.

$cat /usr/share/calendar/calendar.birthday | grep 09/16
09/16	Allen Funt born in Brooklyn, NY, 1914

$cat /usr/share/calendar/calendar.birthday | grep Steve
07/25	Steve Goodman is born in Chicago, 1948
11/13	Robert Louis Stevenson born, 1850

Extra

Thanks to reader James Hindle for pointing out that we can see today's music, history, computer and birthday everytime we open up our Terminal, here is how to do it:

  1. Open Terminal and type vim ~/.bash_profile
  2. Press character i to go to Insert Mode
  3. Insert the Terminal commands
    today=`date "+%m/%d"`
    grep $today /usr/share/calendar/calendar.music
    grep $today /usr/share/calendar/calendar.history
    grep $today /usr/share/calendar/calendar.computer
    grep $today /usr/share/calendar/calendar.birthday
    
  4. Quit Insert Mode by pressing Escape key
  5. Type :wq to save the changes to the file and exit vim mode
  6. Relaunch your Terminal and now you should be able to see the changes

Categories: UNIX, Open Source
Tags: Command, Fun, Terminal

Subscribe to RSS Leave a Comment (18)

Related Entries

Some articles taken from our resource base, tightly related to current article, to empower you with more knowledge on tweaking the most out of your Mac.

18 Comments

James Hindle

If you put the following in ~/bash_profile, every time you open a terminal window it will print today's birthdays, and world, music and computer history milestones:

today=`date "+%m/%d"`

grep $today /usr/share/calendar/calendar.music 
grep $today /usr/share/calendar/calendar.history 
grep $today /usr/share/calendar/calendar.computer 
grep $today /usr/share/calendar/calendar.birthday 

Wendy

Thanks for that James. I will plug it to the article.

Jeff Jolley

There is a command-line program to get the calendar stuff out: /usr/bin/calendar.  Normally, you do "calendar -f {calendar-file}", so:


calendar -f calendar.music

will give you the music calendar. It will also automatically do stuff like, if today is Friday, it will show you Saturday and Sunday's calendar events so you won't miss them over the weekend when you're not at work. It's very cool. You can customize how you want your calendars to work by copying the calendars from the /usr/share/calendar directory to the ~/.calendar director. (You will have to create that directory, of course). "man calendar" for more information.

I find it easiest to combine calendars (music/usholidays/birthdays) into one calendar in my home directory and adding a custom calendar directive into my .profile. View /usr/share/calendar/calendar.all to see how to combine calendars.

Ben

Hey, so i tried using James' little extra, BUT by accident I forgot to put a space between date and the first ", and now whenever I open up Terminal it only displays the Last login info and then the following:
-bash: date"+%,/%d" : No such file or directory

and then blank, and I can't enter any code. Please help!!

Zach

just hold ctrl and click c

Miji

I got a few : 

emacs *enter* *F10* *t* *g* *select a game from the list of games*

telnet towel.blinkenlights.nl

say Hi, I'm a mac

Ajan

hey I tried the SUDO command to try putting a message on the Login window, though I cancelled it as soon as I copy pasted the command.. Now my Terminal window Looks like this http://i164.photobucket.com/albums/u39/ajan011/Picture3.png , I tried resetting the look of the terminal in preferences by changing it to default (I'm using a 10.5.6). I can't see my user name now. And everytime I try writing something, it doesn't show it (as if its written in white). Tried removing the plist and reinstalling terminal. Still no,change. Help me out guys..

Goomba4001

I've been looking around usr/share/ for a bit, and I found some goodies:

Richard Stallman Interview (WTF? XD):

cat /usr/share/emacs/22.1/etc/INTERVIEW

How to say "Hello" in every language:

cat /usr/share/emacs/22.1/etc/HELLO

Some cheesey GNU puns, EMACS acronyms, and some funny developers dialogue:

cat /usr/share/emacs/22.1/etc/JOKES

(I personally love it when one of the writers gets irritated with the bash, and tells it to "eat flaming death")

Strange article on motivation and rewards. And why is this on my Mac...?

cat /usr/share/emacs/22.1/etc/MOTIVATION

OH MY GOSH. What the hell is wrong with these people? XD

cat /usr/share/emacs/22.1/etc/sex.6

Bizarrity.

cat /usr/share/emacs/22.1/yow.lines

Will

I did the James Hindle thing and now whenever I open terminal all it says is "[Process completed]" and I cant enter any text. Please Help

thomas sabo

Honestly, I've always been more of a fan of just putting the monitor to sleep than screen savers. Sure they look pretty awesome, but if you're sitting at your computer, are you really doing so with the screen saver on?Good luck for the dates. It has been some times since we last heard about the next tour. I hope they can run it accordingly now.4hK8OQc4NddNnesx

headphones

Honestly, I've always been more of a fan of just putting the monitor to sleep than screen savers. Sure they look pretty awesome, but if you're sitting at your computer, are you really doing so with the screen saver on?Good luck for the dates. It has been some times since we last heard about the next tour. I hope they can run it accordingly now.lXizTdg7KJV6q7YA

geniuseo

Honestly, I've always been more of a fan of just putting the monitor to sleep than screen savers. Sure they look pretty awesome, but if you're sitting at your computer, are you really doing so with the screen saver on?Good luck for the dates.Best Real Estate Agent

Genius

Honestly, I've always been more of a fan of just putting the monitor to sleep than screen savers. Sure they look pretty awesome, but if you're sitting at your computer, are you really doing so with the screen saver on?Good luck for the dates. Forex Robots

Poko

Mes yeux presque sauté hors de ma tête (qui, soit dit en passant, blesse comme l'enfer), ma mâchoire s'est ouverte! Voilà de bonnes nouvelles!  Ишемический инсульт Que ferais-je sans l'Internet?

Polk

I study a lot of blogs just lately and yours is Сайт для женщин 1 from the best. I enjoy studying your posts – clear and well written. Your web page goes straight to my bookmarks. I obtained some good inspirational thoughts after studying it. You also know how to make people rally behind it, obviously from the responses taking time and real effort to make a good article !! Работа удаленно на дому

eote

Honestly, I've always been 70-638 test more of a fan of just putting the monitor to sleep than 70-576 test screen savers. Sure they look pretty awesome, but if you're sitting at your computer, are you really doing so with the screen saver on?Good luck for the dates. It has 70-451 test been some times since we last heard about the next tour. I hope they can run it accordingly now




symptoms milk allergy

hmm ,i'm not sure if this is what i'm looking for but anyway this is interresting and could be useful some day,thanks for taking time to write such cool stuff

Bird Feeders

Great to here from a fellow enthusiast!  
Here's my website for Bird Feeders   
Adam Clayton Jr. Powell~ A mans respect for law and order exists in precise relationship to the size of his paycheck.  - http://www.azbirdfeeders.com/buy-bird-feeders

Leave a Comment