Basic, but useful terminal commands

·1 min read·#misc

It's based on Linux Shell or "Terminal".

Before started, what Unix-like OS command brings? A good example is that find *.js is able to grab all the files end with .js in the current directory we are working with.

find: Unix-like OS command

ls | grep .js

Time-saving command that search and list out files end with .js which is quite similar to find, but with highlighting this time.

Listing with searching

Another useful stuff is that viewing file content with syntax highlighting. It is achieved by brew install bat.

Cat file after installing bat

Resources

Last edited Feb 3, 2021