SHELL SCRIPTS

You can find some useful shell scripts which will help you in your daily system administration tasks

System Tar Restore - Feature-rich Backup Script for Linux

backup script tar restore linux

"System Tar and Restore" is an open-source program for Linux that offers several options to create backups and restore them. It consists of two scripts: One is the main program and the other one is a GUI wrapper. It has [...]

Ivo Ursino 12:05 am

How to Display Random ASCII Art on Terminal

ascii art terminal

ASCII Art Splash Screen is a small tool that displays ASCII Art for users who love fun on the terminal. It pulls a random drawing from a repository and shows it every time you open the terminal. This looks nice, [...]

Ivo Ursino 5:30 am

Shell Script to Backup Files / Directories Using rsync

rsync script

This article we bring shell scripts to backup your files / directories from you local linux machine to a remote linux server using rsync command. This would be an interactive way to perform backup , where you need to provide [...]

Yevhen Duma 5:00 am

70 Shell Scripting Interview Questions & Answers

We have selected expected 70 shell scripting question and answers for your interview preparation. Its really vital for all system admin to know scripting or atleast the basics which in turn helps to automate many tasks in your work environment. [...]

Petras Liumparas 6:00 am

Interactive Shell Script to Copy Files / Directory using SCP

shell script scp

Today we have interactive shell script that will copy files / directory to source to destination. This script will allow copy multiple files and directories. Script will only work assuming you have configured ssh key based authentication between two machines. [...]

Yevhen Duma 6:00 am

First Step Guide to Learn Shell Scripting

myfirstshellscript screenshot

Usually when people say "shell scripting" they have on mind bash, ksh, sh, ash or similar Linux/UNIX scripting language. Scripting is another way to communicate with the computer. Using graphical windows interface (not matter windows or Linux) the user can [...]

Petras Liumparas 9:28 am

How to Show Dialog Box using Shell Script with Examples

This tutorial will give couple of examples on how to use utilities like zenity and whiptail in your Bash shell script to provide message / dialog box . With these utilities your script will be able to inform user about [...]

Ilija Lazarevic 6:00 am

4 Tools Send Email with Subject, Body and Attachment in Linux

smtp

In today's article we will cover a few ways you can use to send emails with attachments from the command line interface on Linux. It can have quite a few uses, for example to send an archive with an application [...]

Bobbin Zachariah 6:00 am

Shell Script to Check Linux System Health

script linux health check run

This article we are introducing a shell script to perform linux system health check. This script collects system information and status like hostname, kernel version, uptime, cpu / memory / disk usage. Script uses hostname, uptime, who, mpstat, lscpu, ps, top, [...]

Yevhen Duma 4:30 pm

Linux Shell Script to Sync Directories Interactively

rsync shell script

This script will sync two directories between two servers. Basically we are using rsync features to run this program. Script will interactively request to input below details. 1) Remote server name or ip 2) Remote system user name 3) Local directory [...]

Bobbin Zachariah 4:35 am

How to Backup MySQL Database using Bash Script

Regular backup of mysql databases are also as important as backing up your code. So I wrote this script to backup all of my databases on local disk. I then added gzip to compress the sql file to save disk [...]

Deep 4:46 am

How To Use Command Line Arguments In Shell Script

In a shell script, you can pass variables as arguments by entering arguments after the script name, for e.g. ./script.sh arg1 arg2. The shell automatically assigns each argument name to a variable. – Arguments are set of characters between spaces [...]

Deep 4:59 am

How to Delete Empty Directories using Script

This article we show how to search for search empty directories and delete them using shell scripting. If the system administrator doesn't want to keep empty directories, this script can quickly remove all of them. You can input the path where you need [...]

Bobbin Zachariah 9:11 am

Linux Shell Script To Find Kernel Version From Multiple Servers

Linux shell script that will login to server via ssh and get kernel version via uname -r command. List of all the servers are in server_list.txt file, script will take name by name and try to ssh with the root [...]

Bobbin Zachariah 7:45 pm