From 8302d8c84633362bd6b8bc0e5e467e9a1e988ba3 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 2 Mar 2023 08:48:23 +0800 Subject: [PATCH] translated --- ... Wordsmith on the Linux command line with dict.md | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) rename {sources => translated}/tech/20230206.1 â­ï¸â­ï¸ Wordsmith on the Linux command line with dict.md (60%) diff --git a/sources/tech/20230206.1 â­ï¸â­ï¸ Wordsmith on the Linux command line with dict.md b/translated/tech/20230206.1 â­ï¸â­ï¸ Wordsmith on the Linux command line with dict.md similarity index 60% rename from sources/tech/20230206.1 â­ï¸â­ï¸ Wordsmith on the Linux command line with dict.md rename to translated/tech/20230206.1 â­ï¸â­ï¸ Wordsmith on the Linux command line with dict.md index 12d98992fe..c9c30650da 100644 --- a/sources/tech/20230206.1 â­ï¸â­ï¸ Wordsmith on the Linux command line with dict.md +++ b/translated/tech/20230206.1 â­ï¸â­ï¸ Wordsmith on the Linux command line with dict.md @@ -7,32 +7,33 @@ [#]: publisher: " " [#]: url: " " -Wordsmith on the Linux command line with dict +在 Linux 命令行上使用 dict 文字工具 ====== -As a writer, I frequently need to determine the correct spelling or definition of words. I also need to use a thesaurus to find alternate words that may have a somewhat different connotation than the one I might otherwise use. Because I frequently use the Linux command line and text-mode tools to do much of my work, it makes sense to use a command line dictionary. +作为一个作家,我ç»å¸¸éœ€è¦ç¡®å®šå•è¯çš„正确拼写或定义。我还需è¦ä½¿ç”¨è¯åº“æ¥å¯»æ‰¾æ›¿ä»£è¯ï¼Œè¿™äº›è¯çš„内涵å¯èƒ½ä¸Žæˆ‘å¯èƒ½ä½¿ç”¨çš„è¯æœ‰äº›ä¸åŒã€‚因为我ç»å¸¸ä½¿ç”¨ Linux 命令行和文本模å¼å·¥å…·æ¥å®Œæˆæˆ‘的大部分工作,所以使用命令行è¯å…¸æ˜¯æœ‰æ„义的。 -I really like using the command line for a number of reasons, the primary one being that it is more efficient for me. It is also far more comprehensive than any one or multiple physical paper dictionaries, could ever be. I have been using the Linux `dict` command for many years and I have come to depend on it. +我éžå¸¸å–œæ¬¢ä½¿ç”¨å‘½ä»¤è¡Œï¼ŒåŽŸå› æœ‰å¾ˆå¤šï¼Œå…¶ä¸­æœ€ä¸»è¦çš„原因是它对我æ¥è¯´æ›´æœ‰æ•ˆçŽ‡ã€‚它也比任何一本或多本实体纸质字典,都è¦å…¨é¢å¾—多。我使用 Linux çš„ `dict` 命令已ç»å¾ˆå¤šå¹´äº†ï¼Œæˆ‘å·²ç»å¼€å§‹ä¾èµ–它了。 -### Install dict on Linux +### 在 Linux 上安装 dict -The dict program is not installed by default on Fedora, but it's easy to install. Here is how to install it on Fedora and similar programs: +dict 程åºåœ¨ Fedora 上没有默认安装,但它很容易安装。以下是如何在 Fedora 或类似å‘行版上安装: ``` $ sudo dnf install dictd ``` -On Debian and similar programs, you must also install the dictionary definitions: +在 Debian 和类似å‘行版上,你还必须安装字典定义: + ``` $ sudo apt install dictd dict-gcide ``` -No additional configuration is required. The minimalistic `/usr/share/doc/dictd/dict1.conf` file specifies the remote server for the dictionary databases. This tool uses the Dictionary Server Protocol (DICT) on port 2628. +ä¸éœ€è¦é¢å¤–çš„é…置。最简å•çš„ `/usr/share/doc/dictd/dict1.conf` 文件指定了字典数æ®åº“的远程æœåŠ¡å™¨ã€‚这个工具使用字典æœåŠ¡å™¨å议(DICT),端å£ä¸º 2628。 -### Use dict on Linux +### 在 Linux 上使用 dict -In a terminal session as a non-root user, type `dict ` to get a list of definitions from one or more dictionaries and the thesaurus. For example, look up the word `memory` this way. +在终端会è¯ä¸­ï¼Œä»¥éž root 用户的身份,输入 `dict ` æ¥èŽ·å–一个或多个字典和è¯åº“的定义列表。例如,以这ç§æ–¹å¼æŸ¥æ‰¾ `memory` 这个è¯ã€‚ ``` $ dict memory | less @@ -96,15 +97,15 @@ From Bouvier's Law Dictionary, Revised 6th Ed (1856) [bouvier]: by 2 & 3 Wm. IV., c. 71, the time of memory commenced from the reign of ``` -I have cut large sections of this result to save space while leaving enough information to provide an idea of what typical results look like. You can also look up multi-word phrases by enclosing them in quotes, either double or single. +为了节çœç©ºé—´ï¼Œæˆ‘删去了这个结果的大部分内容,åŒæ—¶ç•™ä¸‹äº†è¶³å¤Ÿçš„ä¿¡æ¯ï¼Œä»¥æ供一个典型结果的概念。你也å¯ä»¥ç”¨åŒå¼•å·æˆ–å•å¼•å·å°†å¤šå­—短语括起æ¥è¿›è¡ŒæŸ¥è¯¢ã€‚ ``` $ dict "air gapped" ``` -### Dictionaries +### å­—å…¸ -The `dict` command uses several online dictionaries, including legal and technical ones. Dictionaries are also available for many languages. You can `list` the available dictionary databases as shown here: +`dict` 命令使用一些在线字典,包括法律和技术字典。许多语言的字典也是å¯ç”¨çš„。你å¯ä»¥`列出`å¯ç”¨çš„字典数æ®åº“,如下é¢æ‰€ç¤ºï¼š ``` $ dict -D | less @@ -132,17 +133,17 @@ Databases available: ``` -You can specify individual dictionaries with the `-d` option: +ä½ å¯ä»¥ç”¨ `-d` 选项指定å•ä¸ªå­—典: ``` $ dict -d gcide ``` -### Endmost Dictum +### 总结 -Sometimes using words found in the thesaurus is not the best approach to writing as it can obfuscate your meaning. But I do find that the `dict` command can be immensely useful in choosing the best word for a specific meaning. It also ensures that the words I use are spelled correctly. +有时使用è¯åº“中的è¯æ±‡å¹¶ä¸æ˜¯æœ€å¥½çš„写作方法,因为它å¯èƒ½ä¼šæ··æ·†ä½ çš„æ„æ€ã€‚但我确实å‘现 `dict` 命令在为特定的æ„æ€é€‰æ‹©æœ€å¥½çš„è¯æ–¹é¢æœ‰æžå¤§çš„帮助。它还能确ä¿æˆ‘使用的å•è¯æ‹¼å†™æ­£ç¡®ã€‚ -There's a dearth of information about dict. The URL [http://www.dict.org/][1] provides only a web-based interface to the dictionaries. The man page covers syntax. But the command is a useful and fun command to have handy. I admit that after discovering the `dict` command I spent many hours of the day just trying different things to see what the result would be. I was the kid who read the encyclopedia and dictionary. Yes, I was _that_ kid. In addition to being a useful tool when writing or reading, dict can also be a fun tool to satisfy a bit of curiosity. +关于 dict çš„ä¿¡æ¯å¾ˆåŒ®ä¹ã€‚ 这个 URL [http://www.dict.org/][1] åªæ供了一个基于网络的字典界é¢ã€‚手册页涵盖了语法。但是这个命令是一个有用的ã€æœ‰è¶£çš„命令,å¯ä»¥éšèº«æºå¸¦ã€‚我承认在å‘现 `dict` 命令åŽï¼Œæˆ‘花了很多时间å°è¯•ä¸åŒçš„东西,看看结果会是什么。我就是那个读百科全书和字典的孩å­ã€‚是的,我是_那个_å­©å­ã€‚除了在写作或阅读时是一个有用的工具外,dict 也å¯ä»¥æ˜¯ä¸€ä¸ªæœ‰è¶£çš„工具æ¥æ»¡è¶³ä¸€ä¸‹å¥½å¥‡å¿ƒã€‚ -------------------------------------------------------------------------------- @@ -150,7 +151,7 @@ via: https://opensource.com/article/23/2/linux-dict-command 作者:[David Both][a] 选题:[lkxed][b] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) è£èª‰æŽ¨å‡º