Ben Chuanlong Du's Blog

It is never too late to learn.

Tips on fd

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Installation

wajig install fd-find

The install binary is fdfind.

Example Usages

  1. Find all directories under $dir.

    fdfind --type d . $dir
    
  2. Find all files under $dir.

    fdfind --type f --print0 . $dir
    

References …

Tips on "sed"

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Alternatives

  1. sad is a simpler alternative to sed. sad is implemented in Rust and has built-in integration of fzf, which makes it easy to visually inspect changes.

  2. For complicated text substitutions …

Tips on Shell Commands

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

explainshell.com

  1. command-not-found - Suggest installation of packages in interactive bash sessions

  2. nohup, disown

  3. nautilus-open-terminal

Configuration

https://github.com/thoughtbot/til/blob/master/bash/bash_profile_vs_bashrc.md#:~:text=bashrc%20is%20sourced%20on%20every …

Clean Temporary Files in Linux

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

The script purge_cache.sh is a good one for clean cache of various package managers and temporary files on Linux.

Tips on rsync

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Tips and Traps

  1. The command rsync -avh src_dir des_dir (src_dir has no trailing slash) synchronizes the whole directory src_dir into the destination directory des_dir while rsync -avh src_dir/ des_dir (src_dir/ has …