≡ Menu

Linux

12 Bash For Loop Examples for Your Linux Shell Scripting

There are two types of bash for loops available. One using the “in” keyword with list of values, another using the C programming like syntax. This article is part of our on-going bash tutorial series. This explains both of the bash for loop methods, and provides 12 different examples on how to use the bash [...]

{ 54 comments }

Question: How do I execute certain shell script at a specific intervals in Linux using cron job? Provide examples using different time periods. Answer: Crontab can be used to schedule a job that runs on certain internal. The example here show how to execute a backup.sh shell script using different intervals. Also, don’t forget to [...]

{ 28 comments }

SQLite3 is an extremely lightweight SQL database engine that is self-contained and serverless. There is absolutely no configuration that you need to do to get it working. All you need to do is–install it, and start using it. Since this is serverless, it is used in lot of the famous software that you are using, [...]

{ 10 comments }

AWK Vs NAWK Vs GAWK

Awk is a powerful language to manipulate and process text files. It is especially helpful when the lines in a text files are in a record format. i.e A record containing multiple fields separated by a delimiter. Even when the input file is not in a record format, you can still use awk to do [...]

{ 4 comments }

Chkconfig command is used to setup, view, or change services that are configured to start automatically during the system startup. This article contains 7 practical examples that explains how to use the chkconfig command. 1. Check Service Startup status from Shell Script When you execute chkconfig command only with the service name, it returns true [...]

{ 14 comments }

25 Most Frequently Used Linux IPTables Rules Examples

At a first glance, IPTables rules might look cryptic. In this article, I’ve given 25 practical IPTables rules that you can copy/paste and use it for your needs. These examples will act as a basic templates for you to tweak these rules to suite your specific requirement. For easy reference, all these 25 iptables rules [...]

{ 51 comments }

Most organizations run Linux servers for their enterprise databases and applications. However the developers and admins might have Windows laptops. In those cases, you might be using PuTTY (or related tools like PuttyCM) to ssh from Windows to Linux. You might also want to transfer files from Windows to Linux and vice versa. You can [...]

{ 26 comments }

OpenSSH options are controlled through the /etc/ssh/sshd_config file. This article explains the 7 default options in sshd_config file that you should change. In sshd_config, the lines that start with # are comments. For those options that uses the default values, the sshd_config file contains a commented line with the option and its default value. This [...]

{ 21 comments }