今日は、仕事で退屈しているときに役立つことを学ぶためのヒントを共有します。 Calendar を使用して、Unixライクなシステムのコマンドラインから世界史の重要なイベントを表示できます。 指図。カレンダーコマンドを使用するには、 bsdmainutilsをインストールする必要があります バナー、カレンダー、col、colcrt、colrm、column、from、hexdump、look、lorder、ncal、ul、writeなどのFreeBSDユーティリティのコレクションを含むパッケージ。
bsdmainutilsをインストールします
ほとんどのLinuxディストリビューションには、bsdmainutilsがプリインストールされています。まだインストールされていない場合は、ディストリビューションのデフォルトのパッケージマネージャーからインストールできます。たとえば、Debianベースのシステムでは、次のコマンドを実行してbsdmainutilsパッケージをインストールします。
$ sudo apt-get install bsdmainutils
RPMベースのシステムの場合:
$ sudo yum install bsdmainutils
コマンドラインから世界史の重要なイベントを表示
すべての履歴イベントは、 / usr / share / Calendarの個別のカレンダーファイルに保存されます ディレクトリ。すべてのカレンダーファイルを表示するには、次のコマンドを実行します:
$ 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 フラグは、アクセスするカレンダーと calendar.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のビルボバギンズに関連するイベントを表示します。
$ 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
これらの事実が正確かどうかはわかりません。正当なオフライン/オンラインソースでそれらをクロスチェックしてください。コマンドラインから世界史の重要なイベントを知ることは、ゲームをしたり映画を見たりするだけで時間を過ごすのではなく、本当に楽しく、生産的です。
それは今のところすべてです。私はすぐに別の興味深いガイドと一緒にここにいます。このガイドがお役に立てば、ソーシャルネットワークや専門家のネットワークで共有してください。
乾杯!