Last active
August 13, 2017 13:50
-
-
Save crazy-max/568e52aecd76bed80495270a1cd8e0fe to your computer and use it in GitHub Desktop.
List all files and folders of a directory and send it by email
This file contains hidden or 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
#!/bin/sh | |
FOLDER="/mnt" | |
MAIL="root" | |
tree -ah -H $FOLDER --nolinks -- $FOLDER > /tmp/tree-folder.html | |
echo "See attachment." | mutt -a "/tmp/tree-folder.html" -s "Tree of $FOLDER on `hostname`" -- $MAIL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment