This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ghost CMS Installation Script for Ubuntu | |
# This script will set up a new user, install necessary packages, | |
# configure MySQL, and prepare the environment for Ghost CMS | |
# Exit on error | |
set -e | |
# Function to display usage information |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script to delete all .DS_Store files in the current directory and subdirectories | |
echo "Starting to search for and delete .DS_Store files..." | |
# Find and count all .DS_Store files | |
found_files=$(find . -type f -name ".DS_Store") | |
count=$(echo "$found_files" | grep -c "^") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in 1 2 3 4; do while : ; do : ; done & done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# File removal script - removes all files except specified exceptions | |
# Add safety checks and better error handling | |
set -e # Exit on any error | |
# Define files to keep (you can modify this list) | |
KEEP_FILES=( | |
"*ignore" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check if running with root privileges | |
if [ "$(id -u)" -ne 0 ]; then | |
echo "Please run this script with root privileges (sudo)" | |
exit 1 | |
fi | |
# Stop script immediately if a command fails | |
set -e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
find /root/* -mtime +7 -exec rm {} \; |