Linux 十大cool命令

参考:http://os.51cto.com/art/201003/190307.htm

1.以 root 帐户执行上一条命令。
sudo !!

2.利用 Python 搭建一个简单的 Web 服务器。
python -m SimpleHTTPServer

3.在 Vim 中无需权限保存编辑的文件。
:w !sudo tee %

4.更改到上一次访问的目录。
cd -

5.将上一条命令中的 foo 替换为 bar,并执行。
^foo^bar

6.快速备份或复制文件。
cp filename{,.bak}

7.traceroute + ping。
mtr google.com

8.搜索命令历史,但不执行。
!whatever:p

9.将 ssh keys 复制到 user@host 以启用无密码 SSH 登录。
$ssh-copy-id user@host

10.把 Linux 桌面录制为视频。
ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg

猜你喜欢

转载自icebergs.iteye.com/blog/1528635