install all solaris software from http

2011-02-23 1 min read Solaris
If you are behind a firewall and install some software like top or wget then you can not use sunfreeware, and why because ftp is blocked. Now that is not the case any more, you can go the http mirror site of sunfreeware and here is the link for the same http://ftp.sunfreeware.com/ftp/pub/freeware/i386/5.10/ Note: you just need to change the words in bold for sparc or i386 and version of the solaris. Continue reading

Ranking of the most frequently used commands

2011-01-31 2 min read Linux Uncategorized
Lets take a quick look at how to get the most frequently used commands on you shell. So what we need to do is this: 1 <td> <div class="text codecolorer"> history | awk '{print $2}' | awk 'BEGIN {FS="|"}{print $1}' | sort | uniq -c | sort -n | tail | sort -nr </div> </td> </tr> So, how did we arrive at this and will this always work? No it might not always work. Continue reading

shopt causes bash completion to stop working.

2011-01-25 1 min read bash
Couple of days, I added some scripts to my bash startup and suddenly realized that bash completions stopped working. This is tricky situation in bash to figure out what went wrong. So, I set my foot down to make sure that I find out the culprit. Thus I started with method of elimination. So, I started with nothing in .bashrc and kept adding my stuff in batches, until the said feature was broken. Continue reading

Shell Scripting

2011-01-05 1 min read bash Learning Linux
Here are some links for bash programming that you may find useful. http://tips-linux.net/en/content/pro-bash-programming http://tips-linux.net/en/content/expert-shell-scripting http://tips-linux.net/en/content/beginning-linux-command-line http://tips-linux.net/en/content/bash-pocket-reference http://tips-linux.net/en/content/linux-command-line-and-shell-scripting-bible Related articles Linux – Learning the Shell (edugeek.net) 10 Useful Tools, Websites And Tricks to Help You Master Linux Command (maketecheasier.com) lf-submit.sh – Bash mplayer Last.fm scrobbler (yjl.im) Linux command line tricks you need to know: IO redirection and piping (interstellr.com) imabonehead: Houcem HACHICHA’s Blog: My top ten shell/bash tricks! (houcemhachicha.blogspot.com)

write the output of a command to /var/log/user.log… each line will contain $USER, making this easy to grep for.

2010-12-28 2 min read bash Learning Linux
write the output of a command to /var/log/user.log… each line will contain $USER, making this easy to grep for. 1 <td> <div class="text codecolorer"> &nbsp;log() { (echo "$ $@";$@) | logger -t $USER; } </div> </td> </tr> This command is useful if you want to copy the output of a series of commands to a file, for example if you want to pastebin the output from ‘uname -a’, ‘lspci -vvv’ and ‘lsmod’ for video driver trouble-shooting on your favorite Linux forum. Continue reading

Empty a file

2010-12-26 1 min read Learning Linux
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;"> Image via <a href="http://commons.wikipedia.org/wiki/File:Calculator.NET_Screenshot.png">Wikipedia</a> </dd> </dl> This one is for those who know the “touch” command. Hope all of us do not follow a command just because it is on one of the popular site without trying to understand the command and the output. Empty a file 1 <td> <div class="text codecolorer"> touch file </div> </td> </tr> * View this command to comment, vote or add to favourites * View all commands by noisy Continue reading
Older posts Newer posts