生命很短,我用tldr
我們平時(shí)使用命令的時(shí)候,如果忘記的或者不知道這個(gè)命令如何使用,然后你就會(huì)去百度,也會(huì)去使用man 或者 -- help 查看,但是看到的一般都是長篇大論。
如果你看了這篇文章,就會(huì)知道tldr是怎么樣的存在。
tldr 的含義
TL;DR stands for "Too Long; Didn't Read". It originates in Internet slang, where it is used to indicate that a long text (or parts of it) has been skipped as too lengthy. Read more in Wikipedia's TL;DR essay
這個(gè)是從github上截取的一段解釋,全稱是 Too Long;Didn't Read ,翻譯成中文的意思就是什么?
我昨天帶我兒子去參加英語培訓(xùn)課程,他們老師給我做了一個(gè)測試,讓我把自己的電話號(hào)碼用中文說出來,之后,他們又讓我把我的電話號(hào)碼用英語說出來。
用中文說出來很簡單,但是用英文說出來,還是比較困難,因?yàn)槲艺f英文的時(shí)候,總是先想一下才能說出來,這就導(dǎo)致了速度很慢。
說中文的時(shí)候是這樣
說英文的時(shí)候是這樣
我說這個(gè)是想表達(dá)一個(gè)觀點(diǎn),我們對(duì)中文的認(rèn)知是感覺來的,但是對(duì)英文的認(rèn)知是思考來的,所以對(duì)于Too Long;Didn't Read 這句話的理解,如果真翻譯了,就失去它的味道了。
從目前為止,我看到的最好的翻譯是
太長了不看
#如何使用?
很簡單tldr 加上后面需要解釋的命令就好了。
weiqifa@bsp-ubuntu1804:~/in10$ tldr ls ? Page not found. Updating cache... ? Creating index...lsList directory contents.- List files one per line:ls -1- List all files, including hidden files:ls -a- List all files, with trailing / added to directory names:ls -F- Long format list (permissions, ownership, size and modification date) of all files:ls -la- Long format list with size displayed using human readable units (KB, MB, GB):ls -lh- Long format list sorted by size (descending):ls -lS- Long format list of all files, sorted by modification date (oldest first):ls -ltrweiqifa@bsp-ubuntu1804:~/in10$ tldr --update ? Updating... ? Creating index... weiqifa@bsp-ubuntu1804:~/in10$ tldr zipzipPackage and compress (archive) files into zip file.- Package and compress a directory and its contents, [r]ecursively:zip -r compressed.zip path/to/directory- E[x]clude unwanted files from being added to the compressed archive:zip -r compressed.zip path/to/directory -x path/to/exclude- Archive a directory and its contents with the highest level [9] of compression:zip -r -9 compressed.zip path/to/directory- Package and compress multiple directories and files:zip -r compressed.zip path/to/directory1 path/to/directory2 path/to/file- Create an encrypted archive (user will be prompted for a password):zip -e -r compressed.zip path/to/directory- Add files to an existing zip file:zip compressed.zip path/to/file- Delete files from an existing zip file:zip -d compressed.zip "foo/*.tmp"- Archive a directory and its contents to a multi-part [s]plit zip file (e.g. 3GB parts):zip -r -s 3g compressed.zip path/to/directoryweiqifa@bsp-ubuntu1804:~/in10$從上面可以看到,我們可以直接看到比較簡短的使用介紹
如果我們使用man的話,是這樣的。
#如何安裝?
我這里安裝是在ubuntu系統(tǒng)里面,如果是其他的系統(tǒng)需要自行查找資料。
sudo apt-get install nodejs
sudo apt-get install npm
sudo npm install -g tldr
執(zhí)行上面三條指令后,需要再執(zhí)行
tldr ?--update
來更新tldr 到最新的狀態(tài)
之后就可以讓tldr 帶你享受人生了,說實(shí)話,我用了這個(gè)命令后,覺得自己的時(shí)間可以節(jié)省下至少 10分鐘。
weiqifa@bsp-ubuntu1804:~$ tldr dd ? ?ddConvert and copy a file.- Make a bootable usb drive from an isohybrid file (such like archlinux-xxx.iso) and show the progress:dd if=file.iso of=/dev/usb_drive status=progress- Clone a drive to another drive with 4MB block, ignore error and show progress:dd if=/dev/source_drive of=/dev/dest_drive bs=4M conv=noerror status=progress- Generate a file of 100 random bytes by using kernel random driver:dd if=/dev/urandom of=random_file bs=100 count=1- Benchmark the write performance of a disk:dd if=/dev/zero of=file_1GB bs=1024 count=1000000- Check progress of an ongoing dd operation (Run this command from another shell):kill -USR1 $(pgrep ^dd)#相關(guān)鏈接
https://github.com/tldr-pages/tldr
#推薦閱讀:? ??專輯|Linux文章匯總
? ??專輯|程序人生
? ??專輯|C語言
嵌入式Linux
微信掃描二維碼,關(guān)注我的公眾號(hào)?
總結(jié)
以上是生活随笔為你收集整理的生命很短,我用tldr的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。