RSSCategory: LINUX SHELL SCRIPT

Shell Script To Run Commands In Users Home Directory

May 22, 2013 | By | Reply More
Shell Script To Run Commands In Users Home Directory

Shell script that run linux commands in all users home directories and outputs its results. Scripts accepts user name and command as the argument. Shell Script #Next line tell with shell to use #!/bin/bash #we store in variable path to file UserListFile=/tmp/user.list #We create function with name Usage Usage () { #printing help echo “$0 [...]

Read More

Shell Script To Delete Duplicate Files

May 19, 2013 | By | Reply More
Shell Script To Delete Duplicate Files

Shell Script is looking for duplicated names in files withing sub-directories, and after check md5sum. If md5sum of the files same then we conclude its duplicated. This helps system administrator to delete unnecessary copy to reduce used space. Script also ask user to enter directory where to search, and check if input is empty. Shell [...]

Read More

Shell Script To Find Directories Which Consume Highest Space

May 16, 2013 | By | Reply More
Shell Script To Find Directories Which Consume Highest Space

Shell script to show X number of directories that consume space in a path. This script useful if user need quickly to clean up space, so first user need to check what directory take most of space and the delete according to your wish. Commands used are du with different keys , then sort and [...]

Read More

Shell Script To Collect Linux System Information

May 12, 2013 | By | Reply More
Shell Script To Collect Linux System Information

Shell script that take info about linux system like logged users, uptime, load average, free memory, disk usage. Script helps to see all info about system in a second. Administration can modify the script bit ,if it requires to find system information from multiple server. Script run commands w, uname, uptime, free and df. From [...]

Read More

Shell Script : Backup MySql Databases In Compressed Format

April 28, 2013 | By | Reply More
Shell Script : Backup MySql Databases In Compressed Format

This shell script will create dump of all databases from mysql server. Allow system administrator to have backups of all databases. The output would be in a tar.gz zipped format. Script is using mysqldump and tar command for this purpose. Shell Script #!/bin/bash #Check if user input hostname, if not – exit from script if [...]

Read More