真香!Linux命令查询神器来了,像用搜索引擎一样优雅地查找命令
▍如何安装?
$ mkdir -p ~/bin && wget https://raw.githubusercontent.com/san-kumar/howdoi/master/howdoi -O ~/bin/howdoi && chmod +x ~/bin/howdoi
$ sudo ln -s ~/bin/howdoi /usr/local/bin/howdoi
$ howdoi check my linux version
▍如何使用?
-n:结果数量(默认为1)
-v:显示完整答案(否则只显示代码)
-i:交互式或 REPL 模式(用于热键绑定)
-h:帮助
1、快速查找信息
$ howdoi extract a bz2 file
-j, --bzip2
filter the archive through bzip2
tar -xvjf enginsxt.tar.bz2
Source: https://askubuntu.com/questions/707861/how-to-extract-tar-bz2
2、显示详细信息
$ howdoi -v add a program to cron
Put a shell script in one of these folders: /etc/cron.daily, /etc/cron.hourly, /etc/cron.monthly or /etc/cron.weekly.
If these are not enough for you, you can add more specific tasks e.g. twice a month or every 5 minutes. Go to the terminal and type:
crontab -e
...snip
Source: https://askubuntu.com/questions/2368/how-do-i-set-up-a-cron-job
3、返回多个结果
$ howdoi -n 2 attach to a screen
screen
screen -S myprogramrunningunderscreen
screen -ls
There are screens on:
4964.myprogramrunningunderscreen (05/31/2013 09:42:29 PM) (Detached)
4874.pts-1.creeper (05/31/2013 09:39:12 PM) (Detached)
Source: https://askubuntu.com/questions/302662/reattaching-to-an-existing-screen-session
screen -d -r
Source: https://askubuntu.com/questions/302662/reattaching-to-an-existing-screen-session
4、其它相关
$ howdoi js hex to int
hexString = yourNumber.toString(16);
yourNumber = parseInt(hexString, 16);
Source: https://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hexadecimal-in-javascript
$ howdoi upgrade to latest php
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-add-repository ppa:ondrej/php
sudo apt-add-repository ppa:ondrej/php5-oldstable
sudo apt-add-repository ppa:ondrej/php5
sudo apt-add-repository ppa:ondrej/php5-5.6
sudo apt-get update
sudo apt-get install php5.5
sudo apt-get install php5.6
sudo apt-get install php7.0
do-release-upgrade
Source: https://askubuntu.com/questions/565784/how-do-i-upgrade-php-version-to-the-latest-stable-released-version
howdoi工具调用的解答库来源于askbuntu.com论坛上的提问,论坛上已有的问题解答都可以通过本工具实现对话式查询。
https://github.com/san-kumar/howdoi
文末留言赠书! 24小时点赞最多的走心留言获得此书,禁止恶意刷赞。
本书从模型与数学的角度来理解GAN 变体,希望通过数学符号表达出不同GAN 变体的核心思想,适合人工智能、机器学习、计算机视觉相关专业的人员学习使用。