I can never remember…

There are some Linux commands that I can never for the life of me remember. Maybe documenting them here will give me a place to come back to when I find myself at a loss.

Deleting files using find:

find . -mtime +3 -exec rm -rf {} \;
#dl all files in cur dir that have not been mod in 3 days

Test for a null string in bash?

if [ -z $VAR ]; then #returns true if the string is empty
 
if [ -n $VAR]; then #returns true if the string is NOT empty
 
if [ $VAR ]; then #returns true is variable exists