Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- dirs=("dir1/" "dir2/" "dir3/" "dir4/" "dir5/" "dir6/" "dir7/" "dir8/")
- for i in "${dirs[@]}"; do
- newFile="$(find /path/to/folder/$i -type f -ls | sort | head -n 1)"
- if test 'find "$newFile" -type f -mtime -1'
- then
- echo -e "OK:Backup was written.n"
- else
- echo -e "ERROR:Backups was not writtenn"
- fi
- done;
Add Comment
Please, Sign In to add comment