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

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

On switching to TexStudio!

For many many year I have been using TexMaker for all my offline LaTeX document creation, compiling and editing needs. A few years back, Overleaf came along with its super ease-of-access approach to online LaTeX document editing and sharing. Overleaf has an edge over other LaTeX software distributions, mainly because of the following reasons: Overleaf is online, so the document can be accessed from anywhere with Internet. Adding collaborators is as easy as adding their email addresses....

 April 3, 2025  •   1 min  •   180 words  •   Suyog Garg

How to use Git With Dropbox?

Problems I have encountered using Dropbox: Dropbox storage space available for use is really low, and is consumed relatively easily because of the .git folder. Dropbox real time sync has issues with git if multiple computers work on a project simultaneously. Although, it has been rare that I have encountere this. My current solution for this problem is as follows: Move the most space consuming .git folders outside of Dropbox. This way Dropbox won’t be syncing these large folders....

 April 2, 2025  •   2 min  •   413 words  •   Suyog Garg