---
title: "Linux命令"
author: "sylixj2009"
date: "2010-10-29T20:19:02Z"
tags: []
categories: ["操作系统"]
slug: "linux"
draft: false
lastmod: "2010-10-29T20:19:02Z"
id: 798005
url: "https://springcher.iteye.com/blog/798005"
---

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 桌面录制为视频。

Mercury TestDirector 提单工具