Ben Chuanlong Du's Blog

It is never too late to learn.

Command Line Tools for Mac File System

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

Note: When work both in Linux and macOS, a painful burden to use command-line is to remember subtle differences between Linux commands and macOS commands. A a matter of fact, GNU …

Show Image in Terminal

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

viu is a simple terminal image viewer written in Rust. It works perfectly in kitty . In terminals which does not support inline image display protocols, viu will show the image in …

Tools for Differencing Text Files

General Tips

  1. If 2 files are formatted differently, you can first format them and then check the differences between them. An extreme way is to get rid of all white spaces in the 2 files and then compare them.
    sed -i 's/ //g' file_1 file_2
    

Command-line Tools

git-diff

git diff …

Copying Files in Linux

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

  1. Generally speaking, you do not want to follow symbolic links when copying files unless you are copying from one machine to another. If you do not want follow symbolic links, use …