Contents

Linux Bash 操作技巧

Contents

My 5 Favorite Linux Shell Tricks for SPEEEEEED (and efficiency) - YouTube
看到 Youtube 推薦 Linux 操作技巧,感覺特別有趣,所以紀錄一下。

1:04​ - sudo !! - re-run previous command with ‘sudo’ prepended
1:53​ - ctrl-k, ctrl-u, ctrl-w, ctrl-y - cutting and pasting text in the command line

Ctrl+K 刪後面文字
Ctrl+U 刪前面文字

“Alt + backspace” is more useful than “ctrl + w”

Bash Shell 快速鍵 – Tsung’s Blog
Bash環境下 Ctrl+A~Z @ Altohorn-linux :: 隨意窩 Xuite日誌

3:24​ - practical kill/yank example
Ctrl+U 剪下全部
Ctrl+Y 貼上

4:04​ - use ’less +F’ to view logfiles, instead of ’tail’ (ctrl-c, shift-f, q to quit)

使用less +F滚动查看日志_polygun2000_新浪博客

6:25​ - ctrl-x-e - continue editing your current shell line in a text editor (uses $EDITOR)
7:54​ - alt-. - paste previous command’s argument (useful for running multiple commands on the same resource)
9:18​ - reset - resets/unborks your terminal

https://raw.githubusercontent.com/it9gamelog/it9gamelog/master/bash_cheatsheet/Bash%20Cheatsheet.png

最近看Bash Hotkey貓紙 - I.T. 9 遊戲日誌 - Medium,跟上面介紹影片一樣