Guest User

Untitled

a guest
Nov 4th, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. find /path/to/folder/ -type f -size +1M -name "*.mov" -printf "%fn" | ssmtp my_email@domain.com
  2.  
  3. find /path/to/folder/ -type f -size +1M -name "*.mov" -printf "%fn" | my_email@domain.com < /path/to/file/subjectline.txt
  4.  
  5. {
  6. echo To: my_email@domain.com
  7. echo From: from_email@example.com
  8. echo Subject: mov files greater than 1M
  9. echo
  10. find /path/to/folder/ -type f -size +1M -name "*.mov"
  11. } | ssmtp my_email@domain.com
  12.  
  13. # cat /opt/mail.sh
  14. #!/bin/bash
  15. echo "Subject: from pc" > /root/myip.txt
  16. curl -s checkip.dyndns.org >> /root/myip.txt
  17. sleep 10
  18. /usr/sbin/ssmtp email@domain.org < /root/myip.txt
  19.  
  20. # cat /root/myip.txt
  21. Subject: from pc
  22. <html><head><title>Current IP Check</title></head><body>Current IP Address: xxx.xxx.xxx.xxx</body></html>
Add Comment
Please, Sign In to add comment