Last active
August 29, 2015 14:18
-
-
Save phpdave/efe4a47e560041946d9d to your computer and use it in GitHub Desktop.
Nifty Linux commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#To find all files modified in the last 24 hours (last full day) in a particular specific directory and its sub-directories: | |
find /directory_path -mtime -1 -ls | |
#Send this to me in an email -- SECURITY WARNING your sending file and directory structure over insecure email | |
find ./ -mtime -1 -ls | mail -s subject user@gmail.com | |
#attempt at conditional sending | |
[[ -n `find ./ -mtime -1 -ls` ]] && { find ./ -mtime -1 -ls | mail -s subject user@gmail.com;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment