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

在 Linux 上使用 Tealdeer 替代手冊頁

系統(tǒng) Linux
手冊頁是我開始探索 Linux 時最常用的資源。當(dāng)然,對于初學(xué)者熟悉命令行指令而言,man 是最頻繁使用的指令。但是手冊頁中有大量的選項和參數(shù)列表,很難被解讀,這使得你很難理解你想知道的東西。如果你想要一個更簡單的解決方案,有基于例子的輸出,我認(rèn)為 tldr (太長不讀)是最好的選擇。

Tealder 是 Rust 版本的 tldr,對常用的命令提供了易于理解的說明信息。

手冊頁是我開始探索 Linux 時最常用的資源。當(dāng)然,對于初學(xué)者熟悉命令行指令而言,man 是最頻繁使用的指令。但是手冊頁中有大量的選項和參數(shù)列表,很難被解讀,這使得你很難理解你想知道的東西。如果你想要一個更簡單的解決方案,有基于例子的輸出,我認(rèn)為 tldr (太長不讀too long dnot's read)是最好的選擇。

Tealdeer 是什么?

Tealdeer 是 tldr 的一個基于 Rust 的實現(xiàn)。它是一個社區(qū)驅(qū)動的手冊頁,給出了非常簡單的命令工作原理的例子。Tealdeer 最棒的地方在于它幾乎包含了所有你通常會用到的命令。

安裝 Tealdeer

在 Linux 系統(tǒng),你可以從軟件倉庫安裝 Tealdeer,比如在 Fedora 上:

  1. $ sudo dnf install tealdeer

在 macOS 可以使用 MacPorts 或者 Homebrew。 同樣,你可以使用 Rust 的 Cargo 包管理器來編譯和安裝此工具:

  1. $ cargo install tealdeer

使用 Tealdeer

輸入 tldr-list 返回 tldr 所支持的手冊頁,比如 touchtar、dnf、docker、zcatzgrep 等:

  1. $ tldr --list
  2. 2to3
  3. 7z
  4. 7za
  5. 7zr
  6. [
  7. a2disconf
  8. a2dismod
  9. a2dissite
  10. a2enconf
  11. a2enmod
  12. a2ensite
  13. a2query
  14. [...]

使用 tldr 跟上具體的命令(比如 tar )能夠顯示基于示例的手冊頁,描述了你可以用該命令做的所有選項。

  1. $ tldr tar
  2.  
  3. Archiving utility.
  4. Often combined with a compression method, such as gzip or bzip2.
  5. More information: <https://www.gnu.org/software/tar>.
  6.  
  7. [c]reate an archive and write it to a [f]ile:
  8.  
  9. tar cf target.tar file1 file2 file3
  10.  
  11. [c]reate a g[z]ipped archive and write it to a [f]ile:
  12.  
  13. tar czf target.tar.gz file1 file2 file3
  14.  
  15. [c]reate a g[z]ipped archive from a directory using relative paths:
  16.  
  17. tar czf target.tar.gz --directory=path/to/directory .
  18.  
  19. E[x]tract a (compressed) archive [f]ile into the current directory [v]erbosely:
  20.  
  21. tar xvf source.tar[.gz|.bz2|.xz]
  22.  
  23. E[x]tract a (compressed) archive [f]ile into the target directory:
  24.  
  25. tar xf source.tar[.gz|.bz2|.xz] --directory=directory
  26.  
  27. [c]reate a compressed archive and write it to a [f]ile, using [a]rchive suffix to determine the compression program:
  28.  
  29. tar caf target.tar.xz file1 file2 file3

如需控制緩存:

  1. $ tldr --update
  2. $ tldr --clear-cache

你能夠控制 Tealdeer 輸出的顏色選項,有三種模式選擇:一直、自動、從不。默認(rèn)選項是自動,但我喜歡顏色提供的額外信息,所以我在我的 ~/.bashrc文件中增加了這個別名:

  1. alias tldr='tldr --color always'

結(jié)論

Tealdeer 的美妙之處在于不需要網(wǎng)絡(luò)連接就可以使用,只有更新緩存的時候才需要聯(lián)網(wǎng)。因此,即使你處于離線狀態(tài),依然能夠查找和學(xué)習(xí)你新學(xué)到的命令。更多信息,請查看該工具的 說明文檔。 

 

責(zé)任編輯:龐桂玉 來源: Linux中國
相關(guān)推薦

2020-04-20 12:18:36

Linux手冊頁Linux命令

2023-01-28 13:39:31

Linuxzram

2019-12-05 10:30:17

LinuxMultitail

2011-03-22 10:06:27

LinuxZFS

2021-06-15 16:11:51

Linux手冊頁

2019-12-09 14:50:44

LinuxWindow Make桌面

2019-12-20 08:50:21

LinuxKsnip截圖

2018-02-26 08:14:20

LinuxDocker容器

2021-08-19 18:28:22

FedoraLinuxOpenCV

2020-04-10 09:56:12

at命令Linux安排任務(wù)

2020-10-26 12:30:23

LinuxyumZFS

2018-09-13 08:00:00

LinuxNetplan網(wǎng)絡(luò)配置

2020-05-09 12:01:40

Linux開源軟件SDN

2023-10-15 14:53:22

Arch LinuxYay

2022-07-26 10:13:11

LinuxGNOMERhythmbox

2018-11-02 08:10:58

Linuxsystemd定時器

2018-11-06 09:24:55

LinuxLutries命令

2010-07-02 12:58:39

Meego開發(fā)

2021-10-11 10:33:02

Linux jps命令Java

2021-09-10 10:35:25

Linuxstat命令文件系統(tǒng)
點贊
收藏

51CTO技術(shù)棧公眾號