Type something to search...
Ubuntu 常用命令

Ubuntu 常用命令

  • Productivity
  • 08 Jun, 2017

解壓縮

解壓縮 tar.gz 檔

$tar zxvf file_name.tar.gz

解壓縮 tar 檔

$tar xvf file_name.tar

壓縮成 gz 檔

$gzip -c input_file > output_file.gz

解壓縮 gz 檔

$gzip -d file_name.gz

解壓縮 zip 檔

$unzip file_name -d dir_path

搜尋

察看檔案完整路徑

$readlink -f [file_name]

搜尋檔名關鍵字

$find [path] -name "*keyword*"

搜尋檔案內關鍵字

$grep -inR --exclude-dir={dir1,dir2} [keyword] [path]

Bash Keyboard Shortcuts

移動到最前面

Ctrl + A

移動到最後面

Ctrl + E

清除游標前的所有文字

Ctrl + U

清除游標前一個文字

Ctrl + W

Tmux

detach

[Ctrl + B] + D

attach

$tmux attach
Share :

Related Posts

Git 常用命令
Git 常用命令

將其他分支的某個檔案合併到目前分支 $git checkout other_branch target_file顯示其他分支的檔案 $git show other_branch:path比較兩個 commit 之間的差別 $git diff revision_1:file_1 revision_2:file_2修改 commi

read more
[Mac][iTerm2] 解放 Ctrl←、Ctrl → 用於字與字之間的移動
[Mac][iTerm2] 解放 Ctrl←、Ctrl → 用於字與字之間的移動

終於有時間來研究這件事要怎麼做到,後來研究出最簡單的解法是這樣 簡單來說就是想簡單做到下面這件事:後來發現只要把目前被拿來切換全螢幕的快捷鍵改成用別的鍵就好了。 System Preferences>Keyboard>Shortcuts>Mis

read more
Octopress 常用命令
Octopress 常用命令

新增文章 $bundle exec rake new_post['post_title']編輯文章 $vim source/_posts/post_file預覽網站 $bundle exec rake preview生成網站 $bundle exec rake generate發佈網站

read more
Vim 常用套件與指令
Vim 常用套件與指令

視窗 將目前視窗放到最大 Ctrl + w + _移動到上/下面視窗 Ctrl + w + up/down套件管理 從 vimrc 自動安裝 Vundle " ht

read more
Vim 的 tab 設定
Vim 的 tab 設定

expandtab :在 insert mode 時,輸入 tab 時,改為輸入 space softtabstop :在 insert mode 時,按下 tab 鍵會跑出幾個 space tabstop :tab 的寬度為幾個 space shiftwidth :縮排的寬度為幾個 space實驗 softtabstop 跟 tabstop 先關閉 `e

read more
其實你可以不用 cherry-pick
其實你可以不用 cherry-pick

如果今天有三支 branch:master、staging、feature/b。本來你在開發中的 feature/b 是從 staging 長出來的分支,但是現在你必須將 feature/b 的內容轉移到 master 上,如圖,你會怎麼做呢? 從

read more
Postgresql 常用命令
Postgresql 常用命令

$createdb [database_name]$pg_dump [database_name] -f [backup_filename]$psql -f [backup_filename] [database_name]$dropdb [database_name]

read more