Perpetual calendar

date --date="90 days ago"
Gets any date since today. Other examples of recognized expressions are "2 years 4 days ago", "7 months" (in the future), "next Sunday", "yesterday", "tomorrow", etc.

1
By: dan
2012-03-07 07:49:27

These Might Interest You

  • Contrary to logic, typing calendar won't show a calendar, that's the job of cal. Typing calendar will show some trivia related to the current date. Tested against many Linux distros and FreeBSD. Show Sample Output


    6
    calendar
    vlan7 · 2010-01-29 11:17:11 3
  • Displays a calendar. Show Sample Output


    0
    cal [[month] year]
    raphink · 2009-02-16 15:33:46 0
  • Using the gcalcli interface to google calendar, print the calendar for the next 2 weeks according to the width of the terminal being used. * Remove "--mon" to start week on sunday, * Change 2 for more or less weeks gcalcli --mon --width $((COLUMNS/8)) calm for whole month Show Sample Output


    0
    gcalcli --mon --width $((COLUMNS/8)) calw 2
    jaw42 · 2013-07-04 12:28:51 0
  • Add calendar to desktop wallpaper , mess with the coordinates to place where you like


    15
    convert -font -misc-fixed-*-*-*-*-*-*-*-*-*-*-*-* -fill black -draw "text 270,260 \" `cal` \"" testpic.jpg newtestpic.jpg
    dasmna · 2009-03-16 16:09:58 3

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: