[转]10 个最酷的 Linux 单行命令

下面是来自 Commandlinefu 网站由用户投票决出的 10 个最酷的 Linux 单行命令,希望对你有用。

  1. sudo !!
    以 root 帐户执行上一条命令。
  2. python -m SimpleHTTPServer
    利用 Python 搭建一个简单的 Web 服务器,可通过 http://$HOSTNAME:8000 访问。
  3. :w !sudo tee %
    在 Vim 中无需权限保存编辑的文件。
  4. cd -
    更改到上一次访问的目录。
  5. ^foo^bar
    将上一条命令中的 foo 替换为 bar,并执行。
  6. cp filename{,.bak}
    快速备份或复制文件。
  7. mtr google.com
    traceroute + ping。
  8. !whatever:p
    搜索命令历史,但不执行。
  9. $ssh-copy-id user@host
    将 ssh keys 复制到 user@host 以启用无密码 SSH 登录。
  10. ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg
    把 Linux 桌面录制为视频。

原文地址:http://linuxtoy.org/archives/top-10-one-liners.html

发表评论?

6 条评论。

  1. 10个最酷的Linux单行命令 - Blinux - pingback on 2010 年 03 月 27 日 在 10:18
  2. 规划:.org与.me域名的内容定位 http://www.ihiro.org/the-contents-of-org-and-me

    摄影:5月3日,外滩美丽夜景 http://www.ihiro.me/may-3-the-beautiful-night-view-of-waitan

    我的博客分家了,呵呵!

  3. 博主,帮我改下友情链接,我换了新域名。RIA之家:http://www.36ria.com,谢谢

  4. 有几条还真没试过。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackbacks and Pingbacks: