Guest User

Untitled

a guest
Mar 22nd, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. dirs=("dir1/" "dir2/" "dir3/" "dir4/" "dir5/" "dir6/" "dir7/" "dir8/")
  4. for i in "${dirs[@]}"; do
  5. newFile="$(find /path/to/folder/$i -type f -ls | sort | head -n 1)"
  6. if test 'find "$newFile" -type f -mtime -1'
  7. then
  8. echo -e "OK:Backup was written.n"
  9. else
  10. echo -e "ERROR:Backups was not writtenn"
  11. fi
  12. done;
Add Comment
Please, Sign In to add comment