Category: shell
Unix : Shell script that performs log file analysis : Find the top 5 IP addresses
In this article we will explain a script will analyze an Apache web server’s access log file to find the…
Unix : Shell script that monitors the system’s CPU usage and free memory
Here we will discuss on a shell script that monitors the system’s CPU usage and free memory, and issues a…
Shell : Shell script that checks the status of a specific web page
Here we will explain a shell script that checks the status of a specific web page. It could be used…
Shell : Shell script that monitors the disk usage of a specified directory and sends an alert if the disk usage exceeds
Here we will discuss about a shell script that monitors the disk usage of a specified directory and sends an…
Unix : Shell script that backs up a specific directory to a destination directory
Example of a shell script that backs up a specific directory to a destination directory, creating a new backup directory…
Shell : Optimizes PNG images in a directory using optipng
Example of a shell script that scans a given directory, finds any PNG images, and optimizes them using a tool…
Shell : Bash shell script that will recursively traverse and replace the file or extension
Here’s a simple Bash shell script that will recursively traverse through the directory it’s run in and rename all .jpg…
Shell : Connecting to a remote server and execute a series of Git commands
ssh -o StrictHostKeyChecking=no "$server" "cd ~/work/${project_name}/; git fetch; git checkout $GIT_BRANCH; git pull The command will use the Secure Shell…
Shell : rsync : Synchronizing files and directories between two locations
rsync : Stands for ‘remote sync’. This tool is used for synchronizing files and directories between two locations. Example "rsync…
Unix : Finding the size of a folder in GB
To find the size of a folder in gigabytes (GB) using the shell, you can use the du command with…