Skip to content

linux fzf

ghdrako edited this page Jul 5, 2023 · 1 revision

Selecting a Process to Kill

ps aux | fzf | awk '{print $2}' | xargs kill

Searching Command History

history | fzf

Checkout to a Git branch

git branch --all | fzf | xargs git checkout

Opening a file in Vim

vim $(fzf --preview 'echo {}')

Selecting and copying text from a file

find . -type f | fzf --preview 'cat {}' | xargs -r awk '{print}' | xclip -selection 

Test

Clone this wiki locally