Skip to content

Unix Wiki

Diff two directories

diff --brief --recursive -x '.git' -x 'autoload' \
    ~/.config/nvim ~/


Note: -i "" is only for MacOS. More here.

Moving around

# inspiration from
# cd to the root of git repo
alias cdr="cd $(git rev-parse --show-toplevel)"

# use fzf to quickly cd into subdirectories
function c() {
  local selected_directory
  selected_directory=$(fd -t d | fzf --height=6 --layout=reverse)

  if [ -n "$selected_directory" ]; then
    cd $selected_directory

Ignore directories with tree

tree -I '__pycache__|node_modules|test_*'