10個最酷的Linux單行命令

來源:互聯網
上載者:User

下面是來自 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 案頭錄製為視頻。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.