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.
10 lines
317 B
10 lines
317 B
#!/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 |