如何从命令行查看世界历史上的重大事件

今天,我将分享一个技巧,让你在工作感到无聊时学习一些有用的东西。 您可以使用类 Unix 系统的命令行查看世界历史中的重大事件 日历 命令。 要使用日历命令,您需要安装 bsdmainutils 包含一系列 FreeBSD 实用程序的软件包,例如banner、calendar、col、colcrt、colrm、column、from、hexdump、look、lorder、ncal、ul 和 write。

安装 bsdmainutils

大多数 Linux 发行版都预装了 bsdmainutils。 如果尚未安装,您可以从发行版的默认包管理器中安装它。 为了 example,在基于 Debian 的系统上,运行以下命令来安装 bsdmainutils 包。

$ sudo apt-get install bsdmainutils

在基于 RPM 的系统上:

$ sudo yum install bsdmainutils

从命令行查看世界历史上的重大事件

所有历史事件都将存储在单独的日历文件中 /usr/share/日历 目录。 要查看所有日历文件,请运行:

$ ls /usr/share/calendar/

样本输出:

calendar.all calendar.debian calendar.holiday calendar.kazakhstan calendar.ubuntu hr_HR
calendar.argentina calendar.discordian calendar.hungarian calendar.lotr calendar.ukrainian hu_HU
calendar.australia calendar.dutch calendar.judaic calendar.music calendar.unitedkingdom ru_RU
calendar.belgium calendar.eu calendar.judaic.2016 calendar.newzealand calendar.usholiday uk_UA
calendar.birthday calendar.freebsd calendar.judaic.2017 calendar.pagan calendar.world
calendar.christian calendar.french calendar.judaic.2018 calendar.russian de_AT
calendar.computer calendar.german calendar.judaic.2019 calendar.southafrica de_DE
calendar.croatian calendar.history calendar.judaic.2020 calendar.thai fr_FR

只需键入以下命令,即可了解世界历史上今天发生的重要事件。

$ calendar

此日历实用程序检查当前目录或 CALENDAR_DIR 环境变量指定的目录以查找名为 calendar 的文件,并显示以今天或明天开始的行。 在星期五,将显示星期五至星期一的事件。

样本输出:

 Apr 11 National Heroes Day in Costa Rica
 Apr 11 Es asesinado Justo J. de Urquiza en el Palacio San José, 1870
 Apr 11 Bruce A. Mah <[email protected]> born in Fresno, California, United States, 1969
 Apr 11 N'oubliez pas les Stanislas !
 Apr 11 Bonne fête aux Gemma !
 Apr 11 Aujourd'hui, c'est la St(e) Léon.
 Apr 11 Attentat auf Dutschke, Studentenunruhen, 1968
 Apr 11 Leó, Szaniszló
 Apr 12 Confederate troops fire first shots of Civil War at Ft Sumter, 1861
 Apr 12 Space Shuttle Columbia launched, 1981
 Apr 12 Yuri Gagarin becomes the first man in space, 1961
 Apr 12 Patrick Gardella <[email protected]> born in Columbus, Ohio, United States, 1967
 Apr 12 Ed Schouten <[email protected]> born in Oss, the Netherlands, 1986
 Apr 12 N'oubliez pas les Jules !
 Apr 12 Bonne fête aux Sabas !
 Apr 12 Gyula
 Apr 12 День космонавтики

以防万一您遇到错误 “日历:/usr/bin/cpp:没有这样的文件或目录”你需要安装 cpp 包裹。

在 Ubuntu 中,运行以下命令进行安装。

$ sudo apt-get install cpp

您还可以使用“cat”命令显示如下事件。

要查看所有历史事件,请运行:

$ cat /usr/share/calendar/calendar.history

从命令行了解世界历史上的重大事件

它主要显示与美国相关的事件,但阅读起来非常有用且非常有趣。

要列出与计算机相关的所有重要事件,请运行:

$ cat /usr/share/calendar/calendar.computer

此外,您可以使用如下搜索词缩小搜索结果的范围。

$ cat /usr/share/calendar/calendar.computer | grep "Unix"

想知道 Ubuntu 的历史事件吗? 赶紧跑:

$ calendar -f /usr/share/calendar/calendar.ubuntu -A 365

在这里, -F flag 指示您要访问的日历,以及 日历.ubuntu 是 Ubuntu 重要事件的文件。

样本输出:

Apr 17 Ubuntu 14.04 LTS (Trusty Tahr) released, 2014
Apr 19 Ubuntu 7.04 (Feisty Fawn) released, 2007
Apr 23 Ubuntu 9.04 (Jaunty Jackalope) released, 2009
Apr 24 Ubuntu 8.04 LTS (Hardy Heron) released, 2008
Apr 25 Ubuntu 13.04 (Raring Ringtail) released, 2013
Apr 26 Ubuntu 12.04 LTS (Precise Pangolin) released, 2012
Apr 28 Ubuntu 11.04 (Natty Narwhal) released, 2011
Apr 29 Ubuntu 10.04 LTS (Lucid Lynx) released, 2010
Jun 01 Ubuntu 6.06 LTS (Dapper Drake) released, 2006
Oct 10 Ubuntu 10.10 (Maverick Meerkat) released, 2010
Oct 13 Ubuntu 5.10 (Breezy Badger) released, 2005
Oct 13 Ubuntu 11.10 (Oneiric Ocelot) released, 2011
Oct 17 Ubuntu 13.10 (Saucy Salamander) released, 2013
Oct 18 Ubuntu 7.10 (Gutsy Gibbon) released, 2007
Oct 18 Ubuntu 12.10 (Quantal Quetzal) released, 2012
Oct 20 Ubuntu 4.10 (Warty Warthog) released, 2004
Oct 23 Ubuntu 14.10 (Utopic Unicorn) released, 2014
Oct 26 Ubuntu 6.10 (Edgy Eft) released, 2006
Oct 29 Ubuntu 9.10 (Karmic Koala) released, 2009
Oct 30 Ubuntu 8.10 (Intrepid Ibex) released, 2008
Apr 08 Ubuntu 5.04 (Hoary Hedgehog) released, 2005

想查看名人的出生日期或死亡日期吗? 运行这个命令:

$ calendar -f /usr/share/calendar/calendar.birthday -A 365

您还可以使用搜索特定年份发生的事情 grep 命令如下。

$ grep '1984$' /usr/share/calendar/calendar.*

此命令将显示 1984 年发生的所有事件。

样本输出:

/usr/share/calendar/calendar.argentina:Oct 15 Se es concedido el Nobel de Medicina a César Milstein, 1984
/usr/share/calendar/calendar.computer:01/01 AT&T officially divests its local Bell companies, 1984
/usr/share/calendar/calendar.computer:Apr 01 Usenet site kremvax announced as an April Fool's joke, 1984
/usr/share/calendar/calendar.computer:Jan 24 Introduction of the first Mac, 1984
/usr/share/calendar/calendar.freebsd:02/26 Pietro Cerutti <[email protected]> born in Faido, Switzerland, 1984
/usr/share/calendar/calendar.freebsd:05/19 Sofian Brabez <[email protected]> born in Toulouse, France, 1984
/usr/share/calendar/calendar.freebsd:06/18 Li-Wen Hsu <[email protected]> born in Taipei, Taiwan, Republic of China, 1984
/usr/share/calendar/calendar.freebsd:10/20 Dmitry Marakasov <[email protected]> born in Moscow, Russian Federation, 1984

下载免费备忘单:“Linux 命令行备忘单”

怎么样 指环王 时间线?

是的,您还可以查看与指环王 (LOTR) 事件相关的主要日期。 为此,只需从终端运行以下命令:

$ cat /usr/share/calendar/calendar.lotr

示例输出为:

/*
 * Lord Of The Rings
 *
 * $FreeBSD$
 */

#ifndef _calendar_lotr_
#define _calendar_lotr_

LANG=UTF-8

01/05 Fellowship enters Moria
01/09 Fellowship reaches Lorien
01/17 Passing of Gandalf
02/07 Fellowship leaves Lorien
02/17 Death of Boromir
02/20 Meriadoc & Pippin meet Treebeard
02/22 Passing of King Ellesar
02/24 Ents destroy Isengard
02/26 Aragorn takes the Paths of the Dead
03/05 Frodo & Samwise encounter Shelob
03/08 Deaths of Denethor & Theoden
03/18 Destruction of the Ring
03/29 Flowering of the Mallorn
04/04 Gandalf visits Bilbo
04/17 An unexpected party
04/23 Crowning of King Ellesar
05/19 Arwen leaves Lorian to wed King Ellesar
06/11 Sauron attacks Osgilliath
06/13 Bilbo returns to Bag End
06/23 Wedding of Ellesar & Arwen
07/04 Gandalf imprisoned by Saruman
07/24 The ring comes to Bilbo
07/26 Bilbo rescued from Wargs by Eagles
08/03 Funeral of King Theoden
08/29 Saruman enters the Shire
09/10 Gandalf escapes from Orthanc
09/14 Frodo & Bilbo's birthday
09/15 Black riders enter the Shire
09/18 Frodo and company rescued by Bombadil
09/28 Frodo wounded at Weathertop
10/05 Frodo crosses bridge of Mitheithel
10/16 Boromir reaches Rivendell
10/17 Council of Elrond
10/25 End of War of the Ring
11/16 Bilbo reaches the Lonely Mountain
12/05 Death of Smaug
12/16 Fellowship begins Quest

#endif /* !_calendar_lotr_ */

我可以在指环王中仅查看特定角色的事件吗? 当然可以! 以下命令显示 LOTR 中与 Bilbo baggins 相关的事件。

$ cat /usr/share/calendar/calendar.lotr | grep "Bilbo"

样本输出:

04/04 Gandalf visits Bilbo
06/13 Bilbo returns to Bag End
07/24 The ring comes to Bilbo
07/26 Bilbo rescued from Wargs by Eagles
09/14 Frodo & Bilbo's birthday
11/16 Bilbo reaches the Lonely Mountain

有关更多详细信息,请查看手册页。

$ man calendar

我不确定这些事实是否准确。 请在任何合法的离线/在线资源上交叉检查它们。 从命令行了解世界历史上的重要事件真的很有趣,而且很有成效,而不是仅仅通过玩游戏或看电影来消磨时间。

目前为止就这样了。 我很快就会带着另一个有趣的指南来到这里。 如果您觉得本指南有用,请在您的社交和专业网络上分享。

干杯!

感谢您的光临!

帮助我们帮助您:

祝你有美好的一天!!