Tag: Shell
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…
Uinix : Get the list of all files with their size and creation date, filtering for files larger than some size
Here’s a step-by-step guide on how to get the list of all files with their size and creation date, filtering…
Shell : Deleting empty subdirectories in a directory
In Unix-based operating systems, it is common to write shell scripts to automate tasks. One common task is deleting empty…