more powerful grep – ack

2010-05-26 2 min read Bash Fedora

For last couple of days, I have been using ack instead of grep. Here is description of ack:

Ack is designed as a replacement for grep.

There are couple of reasons I am using ack. First and foremost being it does not require a filename. So, for seaching amit in all files recursively under the current directory I can simply use

ack amit

More reasons to use ack:

It supports pager option and there can be a rc file that can be used to define the default options that needs to be used with ack. Here is the contents of my $HOME/.ackrc file.

Continue reading

10 Wordpress Traffic Builder Plugins That Work

2010-05-26 2 min read Uncategorized

This article covers several useful <a class="zem_slink freebase/en/wordpress" title="WordPress" rel="homepage" href="http://wordpress.org">WordPress traffic builder <a class="zem_slink freebase/en/plugin" title="Plug-in (computing)" rel="wikipedia" href="http://en.wikipedia.org/wiki/Plug-in_%28computing%29">plugins. The most important aspect of owning a <a class="zem_slink freebase/en/website" title="Website" rel="wikipedia" href="http://en.wikipedia.org/wiki/Website">website is the amount of visitors you receive. I’m referring to your website’s traffic, which can be very hard to generate in the beginning stages. It’s essential that you <a href="http://www.makeuseof.com/tag/6-websites-to-track-a-websites-traffic/">track your website’s traffic to see where you’re at.

Continue reading

gnome-disk-manager – the easier way to manage disks in Gnome with Palimpsest

2010-05-25 1 min read Fedora GNOME Linux

I had been using quite different set of tools to this but this is really good. Just install the gnome-disk-manager with

sudo yum install gnome-disk-manager

The interface is very clean and easy to understand and is it very very fast when compared to the other Graphical utilities.

Here are some screenshots to take you through.

<a href="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/screenshot_001.jpe"><img class="alignnone size-full wp-image-1204" title="screenshot_001" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/screenshot_001.jpe" alt="screenshot_001" width="806" height="626" />

<a href="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/screenshot_002.jpe"><img class="alignnone size-full wp-image-1205" title="screenshot_002" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/screenshot_002.jpe" alt="screenshot_002" width="806" height="626" />

Continue reading

mussh - Multihost SSH wrapper

2010-05-25 1 min read Bash Fedora Linux

Description:

Mussh is a <a class="zem_slink freebase/en/shell_script" title="Shell script" rel="wikipedia" href="http://en.wikipedia.org/wiki/Shell_script">shell script that allows you to execute a command or script over ssh on multiple hosts with one command. When possible mussh will use <a class="zem_slink freebase/en/ssh-agent" title="Ssh-agent" rel="wikipedia" href="http://en.wikipedia.org/wiki/Ssh-agent">ssh-agent and RSA/DSA keys to minimize the need to enter your password more than once.

It is a utility for <a class="zem_slink freebase/en/system_administrator" title="System administrator" rel="wikipedia" href="http://en.wikipedia.org/wiki/System_administrator">system administrators maintaining more than one hosts. The utility will help the admin to execute the same command on multiple hosts with a single command.

Continue reading

Menu driven ssh.

2010-05-24 1 min read Bash

I have quite a lot of servers where I need to ssh at workplace and I generally don&#8217;t remember all of them, so I wrote a simple yet useful script. In all the servers I have already copied my key so I dont need a password to login. Without much ado, here is the script.

echo &#8221;Enter the server name:&#8221;
echo &#8221;1. redhat&#8221;
echo &#8221;2. fedora&#8221;

read server

if [ &#8221;$server&#8221; = &#8221;1&#8221; ]; then
ssh amit@redhat
else if [ &#8221;$server&#8221; = &#8221;2&#8221; ]; then
ssh amit@fedora
else
echo &#8221;Not a valid choice&#8221;
fi
fi

Continue reading

The power of find command in Linux – advanced.

2010-05-24 2 min read Linux

Generally whoever uses Linux, would know about the find command. Find the man page <a href="http://amit.themafia.info/phpMan.php?parameter=find&mode=man" target="_blank">here.

There are also lots of blogs, tutorials and other articles on find command on the web, so why write another one. Because it&#8217;s worth every word spent on it 🙂
find is a very powerful command, let&#8217;s see how (options for find command from man page and usage):

depth — Process each directory&#8217;s contents before the directory itself.
maxdepth — Descend at most <span style="text-decoration: underline;">levels (a non-negative integer) levels of directories below the command line arguments.
xdev — Don&#8217;t descend directories on other filesystems.
executable — Matches files which are executable and directories which are searchable (in a file name resolution sense).
This takes into account access control lists and other permissions artefacts which the -perm test ignores.
iname — Like -name, but the match is case insensitive.
nogroup — No group corresponds to file&#8217;s numeric group ID.
nouser — No user corresponds to file&#8217;s numeric user ID.
fls <span style="text-decoration: underline;">file — True; like -ls but write to <span style="text-decoration: underline;">file like -fprint.
ok <span style="text-decoration: underline;">command — Like -exec but ask the user first (on the standard input);
print0 — True; print the full file name on the standard output, followed by a null character
(instead of the newline character that -print uses).
printf <span style="text-decoration: underline;">format — True; print <span style="text-decoration: underline;">format on the standard output, interpreting &#8217;&#8217; escapes and &#8217;%&#8217; directives.

Continue reading
Older posts Newer posts