How to parse json in terminal using jq

A practical tutorial on jq So here’s the problem statement: Find the repository on github in which you have made most number of commits? And you need to do this on terminal (no python) Ofcourse, one can use python to find the answer, and it might be probably easy for you, if you have been using python for last many years. But let’s see if I can do this in terminal with jq and while doing so, let’s learn about it. ...

April 1, 2024 · 4 min · 787 words · Mohit Sharma

How to `find` files in terminal?

Manager: Hey, I need your help, I have couple of images that are taking a lot of space on my PC, I want to delete them. How can I do that? Developer: Well that should be simple. Here, you go. This looks for all files with .png extension in the current directory and its subdirectories (using -R flag), then pipes those file names to rm command to delete them. ls -R | grep ".png$" | xargs rm Manager: Nice, but wait. This will delete all the png files in the current directory and its subdirectories. I only want to delete in specific directories. ...

February 21, 2024 · 2 min · 363 words · Mohit Sharma