自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

在 Linux 命令行上使用 dict 文字工具

系統(tǒng) Linux
Linux 上的 dict 命令對作家來說非常有用,可以為他們的選詞提供大量的字典和同義詞。

作為一個作家,我經(jīng)常需要確定單詞的正確拼寫或定義。我還需要使用詞庫來尋找替代詞,這些詞的內(nèi)涵可能與我可能使用的詞有些不同。因為我經(jīng)常使用 Linux 命令行和文本模式工具來完成我的大部分工作,所以使用命令行詞典是有意義的。

我非常喜歡使用命令行,原因有很多,其中最主要的原因是它對我來說更有效率。它也比任何一本或多本實體紙質(zhì)字典,都要全面得多。我使用 Linux 的 ??dict?? 命令已經(jīng)很多年了,我已經(jīng)開始依賴它了。

在 Linux 上安裝 dict

??dict?? 程序在 Fedora 上沒有默認安裝,但它很容易安裝。以下是如何在 Fedora 或類似發(fā)行版上安裝:

$ sudo dnf install dictd

在 Debian 和類似發(fā)行版上,你還必須安裝字典定義:

$ sudo apt install dictd dict-gcide

不需要額外的配置。這個非常簡單的 ??/usr/share/doc/dictd/dict1.conf?? 文件指定了字典數(shù)據(jù)庫的遠程服務器。這個工具使用字典服務器協(xié)議(DICT),端口為 2628。

在 Linux 上使用 dict

在終端會話中,以非 root 用戶的身份,輸入 ??dict <word>?? 來獲取一個或多個字典和詞庫的定義列表。例如,以這種方式查找 ??memory?? 這個詞。

$ dict memory | less
6 definitions found
From The Collaborative International Dictionary of English v.0.48 [gcide]:
Memory \Mem"o*ry\, n.; pl. {Memories}. [OE. memorie, OF.
memoire, memorie, F. m['e]moire, L. memoria, fr. memor
mindful; cf. mora delay. Cf. {Demur}, {Martyr}, {Memoir},
{Remember}.]
[1913 Webster]
1. The faculty of the mind by which it retains the knowledge
of previous thoughts, impressions, or events.
[1913 Webster]
Memory is the purveyor of reason. --Rambler.
[1913 Webster]
2. The reach and positiveness with which a person can
remember; the strength and trustworthiness of one's power
to reach and represent or to recall the past; as, his
memory was never wrong.
[1913 Webster]
<SNIP>
From WordNet (r) 3.0 (2006) [wn]:
memory
n 1: something that is remembered; "search as he would, the
memory was lost"
2: the cognitive processes whereby past experience is
remembered; "he can do it from memory"; "he enjoyed
remembering his father" [syn: {memory}, {remembering}]
3: the power of retaining and recalling past experience; "he had
<SNIP>
From Moby Thesaurus II by Grady Ward, 1.0 [moby-thesaurus]:
78 Moby Thesaurus words for "memory":
RAM, anamnesis, anniversaries, archetypal pattern, archetype,
awareness, celebrating, celebration, ceremony, cognizance,
commemoration, consciousness, disk memory, dressing ship,
<SNIP>
From The Free On-line Dictionary of Computing (30 December 2018) [foldoc]:
memory
<storage> These days, usually used synonymously with {Random
Access Memory} or {Read-Only Memory}, but in the general sense
it can be any device that can hold {data} in
{machine-readable} format.
(1996-05-25)
From Bouvier's Law Dictionary, Revised 6th Ed (1856) [bouvier]:
MEMORY, TIME OF. According to the English common law, which has been altered
by 2 & 3 Wm. IV., c. 71, the time of memory commenced from the reign of

為了節(jié)省空間,我刪去了這個結(jié)果的大部分內(nèi)容,同時留下了足夠的信息,以提供一個典型結(jié)果的概念。你也可以用雙引號或單引號將多字短語括起來進行查詢。

$ dict "air gapped"

字典

??dict?? 命令使用一些在線字典,包括法律和技術字典。許多語言的字典也是可用的。你可以“列出”可用的字典數(shù)據(jù)庫,如下面所示:

$ dict -D | less
Databases available:
gcide The Collaborative International Dictionary of English v.0.48
wn WordNet (r) 3.0 (2006)
moby-thesaurus Moby Thesaurus II by Grady Ward, 1.0
elements The Elements (07Nov00)
vera V.E.R.A. -- Virtual Entity of Relevant Acronyms (February 2016)
jargon The Jargon File (version 4.4.7, 29 Dec 2003)
foldoc The Free On-line Dictionary of Computing (30 December 2018)
easton Easton's 1897 Bible Dictionary
hitchcock Hitchcock's Bible Names Dictionary (late 1800's)
bouvier Bouvier's Law Dictionary, Revised 6th Ed (1856)
devil The Devil's Dictionary (1881-1906)
world02 CIA World Factbook 2002
gaz2k-counties U.S. Gazetteer Counties (2000)
gaz2k-places U.S. Gazetteer Places (2000)
gaz2k-zips U.S. Gazetteer Zip Code Tabulation Areas (2000)
fd-hrv-eng Croatian-English FreeDict Dictionary ver. 0.1.2
fd-fin-por suomi-português FreeDict+WikDict dictionary ver. 2018.09.13
fd-fin-bul suomi-български език FreeDict+WikDict dictionary ver. 2018.09.13
fd-fra-bul fran?ais-български език FreeDict+WikDict dictionary ver. 2018.09.13
fd-deu-swe Deutsch-Svenska FreeDict+WikDict dictionary ver. 2018.09.13
<SNIP>

你可以用 ??-d?? 選項指定單個字典:

$ dict -d gcide

總結(jié)

有時使用詞庫中的詞匯并不是最好的寫作方法,因為它可能會混淆你的意思。但我確實發(fā)現(xiàn) ??dict?? 命令在為特定的意思選擇最好的詞方面有極大的幫助。它還能確保我使用的單詞拼寫正確。

關于 dict 的信息很匱乏。 這個 URL ??http://www.dict.org/?? 只提供了一個基于網(wǎng)絡的字典界面。手冊頁涵蓋了語法。但是這個命令是一個有用的、有趣的命令,可以隨身攜帶。我承認在發(fā)現(xiàn) ??dict?? 命令后,我花了很多時間嘗試不同的東西,看看結(jié)果會是什么。我就是那個通讀百科全書和字典的孩子。是的,我是_那個_孩子。除了在寫作或閱讀時是一個有用的工具外,??dict?? 也可以是一個有趣的工具來滿足一下好奇心。

責任編輯:龐桂玉 來源: Linux中國
相關推薦

2021-07-15 13:25:43

LinuxPDF

2022-11-18 12:47:51

LinuxAWS命令行工具

2018-04-25 10:46:05

Linux命令行日歷

2019-05-21 10:38:17

Linux命令行

2017-04-12 13:29:08

Linux命令行工具

2017-03-27 14:40:01

Linux命令行工具技巧

2017-04-05 14:10:55

Linux命令行工具技巧

2022-03-14 09:26:32

LinuxUbuntu

2017-04-10 13:26:00

Linux命令技巧

2018-11-05 13:50:44

Linux命令tcpdump

2019-08-27 10:32:01

Linux操作系統(tǒng)Windows

2022-10-18 10:00:09

Linuxtcpdump命令

2014-01-24 09:09:32

Linux命令行網(wǎng)速

2010-06-01 19:14:53

SVN命令行

2021-07-15 13:32:12

Linux生成密碼

2014-06-09 10:23:20

2016-01-04 15:17:50

Linux命令行硬件

2014-08-25 16:23:24

2020-12-10 16:16:08

工具代碼開發(fā)

2020-12-11 06:44:16

命令行工具開發(fā)
點贊
收藏

51CTO技術棧公眾號