bash
intercept stdout/stderr of another process or disowned process
2010/11/23
The command is definately going to save your day if you have disowned the process by mistake. Only uses strace so might as well work on Solaris also, though not tried it. intercept stdout/stderr of …
Broadcast your shell thru port 5000
2010/11/20
Broadcast your shell thru port 5000 […] <td> <div class="text codecolorer"> mkfifo /tmp/fifo;(nc -q0 -l 5000 < /tmp/fifo &);script -f /tmp/fifo </div> …
Screen enable/disable logging in all windows
2010/11/19
If you use screen command a lot then this is something that you will like 🙂 Screen enable/disable loggin in all windows […] <td> <div class="text codecolorer"> bindkey ^l …
function for copy files with progress bar (using pv – pipe viewer)
2010/11/11
function for copy files with progress bar (using pv – pipe viewer) […] <td> <div class="text codecolorer"> cp_p() { if [ `echo "$2" | grep …
Print all environment variables, including hidden ones
2010/11/09
Print all environment variables, including hidden ones […] <td> <div class="text codecolorer"> for _a in {A..Z} {a..z};do _z=${!${_a}*};for _i in `eval echo …
List all the rpms by size – quick way to find out what is eating your disk space in root partition
2010/10/13
Here is a quick command to check the list of installed packages by their size in reverse order. Very useful if you want to remove unwanted rpms just to clean up some space on your disk: […] …
Quick tip on zipping logs in real time.
2010/10/13
Sometimes, some small things that we don’t actually think can be useful are such useful. I faced this couple of days back when I was working on something and the amount of logs getting generated and …
Resize all the images in directory.
2010/10/04
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;"> Image via <a …
[Solved] Abbreviations not working in vim
2010/10/02
Today I found that abbreviations are not working in vim in my current login. I searched log of blog’s and sill did not find any solution so I decided to take the matters in my hand. To start with I …
bash script to run a command and take screenshot in every loop.
2010/09/24
Couple of days back, I had posted a command to display a stop timer with bash and echo. There I had also put the following gif file: <img class="size-medium wp-image-2555" …
bash – echo command with option to display the output on the same line.
2010/09/21
Here is a nice little trick to display the output in the same line : […] <td> <div class="bash codecolorer"> <span class="kw3">echo</span> …
cURL – Tutorial
2010/09/15
Here are linkw to two nice tutorials on curl and how to use curl to login before we try to fetch a page. Hope you find them useful. http://curl.haxx.se/docs/httpscripting.html …