Basic File Encryption Script (encrypt and decrypt files)
#!/bin/bash # Function to encrypt a file encrypt_file() { if [ -f $1 ]; then openssl enc -aes-256-cbc -salt -in
Read MoreMay 18, 2024
#!/bin/bash # Function to encrypt a file encrypt_file() { if [ -f $1 ]; then openssl enc -aes-256-cbc -salt -in
Read More#!/bin/bash # Generate a random password PASSWORD=$(date +%s | sha256sum | base64 | head -c 16) echo “Random Password: $PASSWORD”
Read More#!/bin/bash # Display basic system information echo “Hostname: $(hostname)” echo “System Information: $(uname -a)” echo “Available Memory: $(free -h |
Read More#!/bin/bash # Array of quotes quotes=( “The only way to do great work is to love what you do. –
Read More#!/bin/bash # Define the threshold for file last accessed time (in days) threshold=30 # Remove files older than the threshold
Read More#!/bin/bash # Check if the user provided a file as an argument if [ $# -ne 1 ]; then echo
Read More#!/bin/bash # Check if the user has provided any arguments if [ $# -eq 0 ]; then echo “Usage: $0
Read More