You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
swarms/scripts/cleanup/log_cleanup.sh

10 lines
317 B

5 months ago
#!/bin/bash
# Create the new directory if it doesn't exist
sudo mkdir -p /artifacts_logs
# Find all .log files in the root directory and its subdirectories
find / -name "*.log" -print0 | while IFS= read -r -d '' file; do
# Use sudo to move the file to the new directory
sudo mv "$file" /artifacts_logs/
done