linux - 说说你觉得最狂霸酷炫屌炸天的命令
高洛峰
高洛峰 2017-04-17 11:47:43
0
40
1390

比如:

pwd | pbcopy

mac下是拷贝当前路径到黏贴板

最好写上注释, 对于没有注释的新手们不要乱试啊,乖,出问题了踩答案啊,为毛踩我的问题,看我开的头多好的,没想到楼歪这么厉害.....真是的, 看来TDD还没死,同志们请用你们的大脑编译器跑一下下面这个测试,跑挂了的请自觉修过测试:

def 狂霸酷炫 = (yourCommands) => {
    yourCommands.forEach((command) => {
        assert(command().userReaction).not.contains("草")
        assert(command().userReaction).contains("Woww")
    })
}

Ref: stackoverflow

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(40)
迷茫

adb root,sudo su。

伊谢尔伦

Get external network ip curl ifconfig.me

小葫芦

You are all bad people!

左手右手慢动作

真的是狂欢呀。 If there is any tool worth recommending, I think the multiplexer tmux is worth owning

黄舟
cp target{,.bak}  # 将target备份成target.bak
^old^new  # 将上一条命令中第一个old字符串替换成new后重新执行
Ctrl - l  # 清屏
Ctrl - r  # 搜索历史命令
小葫芦

Some additions to @lidashuang’s answer on the 1st floor,

!! 表示上一次命令
!$ 表示上一次命令的最后一个参数

For example, if you use vi to open nginx, the default configuration is mistakenly written as cd:

cd /etc/nginx/sites-enabled/default

Change to vi

vi !$
阿神

Don’t try it! ! ! ! ! ! ! !

Please see here:
The tragedy caused by a space

For example:
rm -rf /tmp/lib/nvidia-current/xorg/xorg

There is also a coder’s pseudo code on how to express loneliness on Valentine’s Day:

while !stackOverflow 
    push()
    pop()
end
刘奇

Add one more: ctrl-x e
Rapidly invoke an editor to write a long, complex, or tricky command

From: http://www.commandlinefu.com/

阿神

dd if=/dev/null of=/dev/sda

伊谢尔伦
yes ppg
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!