Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
List all files and folders of a directory and send it by email
#!/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