bash

Script to try various themes from kitty terminal

2019/12/16

Here is the script. Very simple yet very useful script.

scan your network with bash IP scan script

2019/10/10

Here is the youtbe video that will walk you through bash script.

ssh trick – ssh to remote host with bastion host

2019/09/16

Lot of times, you have to ssh to a server with bastion host. If you dont know what is bastion host then see this: […] Now, in such cases, either you add an entry in “~/.ssh/config” to route the …

View xml files like a pro

2019/08/05

Viewing XML files can be daunting with tracking mentally where the tag starts and where it ends. So, I ended up with the following alias to help me view xml files

Add files to dropbox with single curl command

2019/07/08

I have been thinking of posting this for sometime now. This is very useful, when you are working on a different Linux box and want to upload a file to dropbox. So, before you run this command, you …

Split pcap to multiple files based on number of packets

2019/06/03

Here is a script that can use tshark to split a large pcap to multiple small pcaps inpcap="test.pcap" max=$(tshark -r $inpcap -n -T fields -e frame.number|tail -1) # This is the number of packets in …

GREP_COLORS – change the colors in the GREP output.

2019/04/22

Today we will look at the variable GREP_COLORS. This variable determines the colour that is used with the grep command. You can look at the man page of the grep command to see what the various options …

copy /proc folder

2019/03/18

Other day, I was trying to copy the proc folder with following command: tar cvzf /tmp/proc.tgz /proc and I found out that all the files in tar were empty. Strange it may seem but lot of people are …

cool sed/grep magic to convert output to csv format

2019/03/11

I generallly keep doing this a lot, so thought will share with you. Lets assume we are capturing free ouput every min/hour/or whatever. The output looks like this: […] Time: Mon Jan 21 23:59:10 …

bash function for rpm whatprovides

2018/12/31

Sometimes some simple one-liner function can save you a lot of time, like-

Directories with maximum number of files

2018/12/10

Lot of times, I want to find the directories with maximum number of files and so I wrote this quick function to do exactly the same

mv command with progress

2018/03/19

When moving large files/directories, I would like to see the progress. Idea for this is to use rsync with progress and remove source files. But that option does not remove the empty directories left …


This website uses cookies to ensure you get the best experience on our website. Learn more Got it