Archive for the 'General' Category

A very small bash script challenge

*Kind Note*: This was written with a sense of humor to allow visitors quickly discover code anomaly and suggests fixes but if it is not up to your mark, please close your browser tab instead of making unnecessary noise. Thanks You!
I am putting a damn small thing here regarding bash script for fun.

Here it goes: Need to create a bash script which asks for a word from user, say either “one”, “two” or “three” and then check in single if statement (no else if section) that if its not “one” or “two” or “three” then print Not OK otherwise print OK.

Run scripts as daemon or through cron continuously

How to run a script per second? Any easy way to check that no multiple instances of the script will run at a single time? I am cnvering 3 simple ways which helps you to fulfill such requirements:

  1. Using Cron
    If script needs to be executed every x minute or a frequency which is more than a minute, then it should run through cron only. You can also place it in cron when the script itself contains code to execute repeatedly. Make sure to redirect all its logs/errors to some log file for checking in case some issue occurs.

5 cool android apps for linux administrators

Having an android based smartphone is cool and using apps related to your core work in it is even more cooler :)

Though there’s not much choice available as far as apps for Linux admin are concerned, but still there are few useful. I tried hereby compiling list of 5 such apps which can be helpful for us but its definitely possible that I didn’t come through some awesome app which you are aware about, in such case, requesting you to please put a comment about it.

1. ConnectBot

Fix ftp/vsftpd issues in Ubuntu server

This is a quick post describing some issues that you may face while installing/running vsftpd in Ubuntu host. I will quickly walk through steps, beginning with installation and then configuration for general purpose FTP access.

1. Install and run vsftpd without login shell

Most obvious thing while running a ftp server is to run it under non login shell. This is quite easy in Redhat based distro but here in Ubuntu, you need to do something extra also to enable users accessing ftp running under non login shell.

Install vsftpd server and start it:

$ apt-get install vsftpd
$ /etc/init.d/vsftpd start

Top 5 best and highly recommended books for linux/unix system admins

When an aspiring Linux system admin inquired me about some good books to read on this topic, I recommended few ones. I glad he liked few books and this gives me an insight to share the list with my blog readers. It definitely a challenging task to filter out 5 books from ocean. There are too many books which looks superior to each other but for the sake of preparing the list, I’ve selected my 5 favorites. Does it mean I think others are not good? Nope. It only means given a choice at a certain point of time, few books will pop up in your mind, which you think are better and that’s how the list get prepared.