Disable a few cores when you want to save power.


If you have a lot of CPU power and working on battery. If you do not need that much of power and would like to rather save some battery power by disabling some cpus then you can use the below script. …

quick bash script for datewise backup of directory


I was working on something and the data was very critical and needed backup. I wrote a bash script to back up the data every 5 hours with cron and bash script. Thought I will share that with you. Here …

Ignore CVS and svn directories in bash autocompletion.


CVS and SVN directories are something that really cause lot of un-necessary nuisance. So, simple solution just ignore them 🙂

Array of all possible colors in bash script


Sometime back, we had looked at using colors in bash script and here is a way to create a array of all the colors. #!/bin/bash - …

colors in bash scripts


I have been trying to understand the color codes for bash for a pretty long time, but somehow never got time to understand this clearly. So this time around when I was writing a script to analyze some …

bash prompts — some good links


Here are some pretty good links on the subject. Since there are already so many blog posts, does not make sense to add one more 🙂 …


15 Linux Bash History Expansion Examples You Should Know


Here is a nice link on BASH History Expansion. There are lot of examples in this page and some of them might be quite useful. But here are my list of favourites: !! This is probably the most used one …

Using file partially for filenames


There are some commands that take file name and there are some case where you need to give file name. But there are some cases where you want to modify the file before passing it to the command. What …

better bash debugging


I was trying to debug some bash scripts yesterday and learnt something new 😉 There are lot of things in bash that you can use to debug and to start with you can enable xtrace mode as follows: set -x …

bash completion


I was working on some functions in bash to make my life easier and realized that if I added custom completion to my functions, it will be really good. So I headed over to google and searched for what …

faster bash operations on files with File Descriptors.


I was writing a bash script that would do some operations and read and write to file. Seems that that was pretty simple with […] <td> <div class="text codecolorer"> while …

Unix shell script for removing duplicate files


The following shell script finds duplicate (2 or more identical) files and outputs a new shell script containing commented-out rm statements for deleting them (copy-paste from here): ::: updated on 02 …

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