Linux Terminal Commands

These are some useful Linux Terminal Commands for productivity: Commands using ls etc. use to ls -ltr list files in reverse modification history order with details. `ls -ltr tail -n 5` `ls head -n 5` rename 's/original/new/' * To rename all filenames and directories containing “original” string to “new” string. To recursively do this in sub-directories, use **/*. See: here and here for dir in */; do mkdir -- "$dir"/{tmp1,foo,bar,qux}; done To create directories within sub-directories in one go!...

 May 9, 2021  •   1 min  •   188 words  •   Suyog Garg

Installing tmux on CentOS server

🧵 Building libevent, ncurses, and tmux Without sudo on a CentOS Server (While Escaping Anaconda) This guide shows how to install ncurses, libevent, and tmux locally under $HOME, without sudo, and without interference from Anaconda, on older CentOS systems. 🧼 Step 1: Start a Clean Build Shell env -i bash --noprofile --norc Then set up the build environment manually: export HOME=/home/yourusername export PATH=/usr/bin:/bin:/usr/local/bin export LD_LIBRARY_PATH= export LIBRARY_PATH= export PKG_CONFIG_PATH="$HOME/local/lib/pkgconfig" export CFLAGS="-I$HOME/local/include -I$HOME/local/include/ncursesw" export LDFLAGS="-L$HOME/local/lib -Wl,-rpath=$HOME/local/lib" 📦 Step 2: Install ncurses Locally If your system is missing the ncursesw headers, or has an old version, build your own:...

 June 17, 2025  •   2 min  •   359 words  •   Suyog Garg

Tokyo->Delhi Flight Price Comparison

Note: Made using ChatGPTv4-o prompt! You’ve shared 6 flight sets, and I’ve compiled all the fares for Air India, ANA, and JAL (all nonstop, round-trip, HND–DEL) in JPY. ✈️ Summary of All Flights Shared Airline Date Type Price (JPY) CO₂ Emissions Notes Air India Weekday ¥82,130 407 kg (−27%) Constant across weekdays Air India Weekday ¥82,130 407 kg Repeated entry Air India Weekend ¥82,130 407 kg Air India Weekend ¥169,330 407 kg One high weekend fare Air India Weekday ¥82,130 407 kg Reconfirmed low fare ANA Weekday ¥142,230 428 kg (−23%) Lower weekday price ANA Weekday ¥142,230 428 kg Repeated fare ANA Weekend ¥195,730 428 kg ANA Weekday ¥195,730 428 kg Repeated fare ANA Weekday ¥195,730 428 kg JAL Weekday ¥115,430 447 kg (−20%) Lower weekday fare JAL Weekday ¥115,430 447 kg Repeated fare JAL Weekday ¥92,930 447 kg One discounted fare JAL Weekend ¥154,430 447 kg Higher weekend fare JAL Weekend ¥632,890 1,788 kg (+222%) Extremely high premium fare JAL Weekday ¥250,430 447 kg Very high weekday fare 📊 Price Averages by Airline & Day Type Airline Avg....

 June 16, 2025  •   3 min  •   506 words  •   Suyog Garg

How to remove large files from `git` commit history?

First, analyze the git storage in the directory with: git filter-repo --analyze Then the large files can be removed from git history using git filter-repo as follows: git filter-repo --strip-blobs-bigger-than 10M This removes all files larger than 10MB from .git/objects/ directory. You may have to use --force argument, if the repository is not a fresh clone. The command will also remove the origin remote, so you will need to readd it!...

 May 15, 2025  •   1 min  •   189 words  •   Suyog Garg

Using Conda and Conda Command Cheatsheet

Installing Conda package on macOS Do: brew install --cask conda This will download miniconda, coda and anaconda3 and all other required affiliated packages. The install location may vary, but is most likely to be in /usr/local/anaconda3/ After the installation, add the path to the anaconda3 installation directory to the $PATH system variable, by: echo 'export PATH="/usr/local/anaconda3/bin:$PATH"' >> ~/.zshrc source ~/.zshrc Initializing Conda Environment Initialize conda for your shell permanently: conda init This will add command lines to your ~/....

 April 11, 2025  •   2 min  •   287 words  •   Suyog Garg