first commit

This commit is contained in:
Roy
2025-06-23 21:19:51 +02:00
commit a4f9ea11f3
69 changed files with 4857 additions and 0 deletions

13
ssh_loops/loop_array.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash
#find only derctoris older then 10 days
DIR_NAME=($(find /opt/backup/database/ -maxdepth 1 -type d -ctime +10))
for dir in "${DIR_NAME[@]}"
do
echo "tar -cvPf $dir.tgz $dir --remove-files"
done
#this will tar and remove
#tar -cvf /home/roy/Desktop/test/some_dir.tgz /home/roy/Desktop/test/some_dir --remove-files