Find and Delete Old Files by Age and Extension
Recursively locate and remove files older than a specified number of days, filtered by file extension, to help manage disk space on web servers.
Curated list of production-ready BASH scripts and coding solutions.
Recursively locate and remove files older than a specified number of days, filtered by file extension, to help manage disk space on web servers.
Efficiently deploy and synchronize local website files to a remote server using rsync, transferring only changed files and excluding specific patterns for faster updates.
Perform a simple health check on a web service endpoint using cURL, verifying its HTTP status code and response time, useful for monitoring.
Create a timestamped, compressed backup of a local Git repository, ideal for safeguarding project history or migrating repositories.
A robust bash script to check the status of a systemd service (e.g., Nginx, Apache) and automatically restart it if it's inactive or failed, ensuring service uptime.
Master parsing command-line options and arguments in bash scripts using `getopts` for creating flexible and user-friendly utilities with short flags.
Streamline static website deployment to a remote server using a simple bash script that utilizes SCP for efficient and secure file transfer.
Implement a straightforward bash script to rotate and archive application log files, preventing excessive disk usage and maintaining a clean server environment.
Master parsing and manipulating JSON data in Bash scripts using the powerful `jq` command-line JSON processor, essential for API interactions and data extraction.
Ensure file integrity in Bash scripts using MD5 or SHA256 checksums to verify downloads or detect unauthorized modifications, crucial for secure deployments.
Securely manage configuration in Bash scripts by loading environment variables from a `.env` file, preventing hardcoding sensitive data and improving portability.
Implement robust file downloads in Bash scripts using `curl` with progress indicators, timeout handling, and automatic retries for reliable fetching of external resources.