Now let's delete them after roughtly 30 days:
alias del="mv -t ~/.Trash/ ; find ~/.Trash/ -mtime +30 -exec rm {} \;" alias del="mv -t ~/.Trash/ ; find ~/.Trash/ -mtime +30 -exec rm {} \;" del() { mv "$@" ~/.Trash/ && find ~/.Trash -mtime +30 -delete }
I also replaced the unnecessary exec by find's builtin -deleteAnd just a reminder everybody please don't run random scripts you find on the internet.
P.S. you need a semicolon before the close brace :)
mkdir foo; del foo
and including it will spawn file not found errors for the contents of the foo directory, if any.EDIT: See also neighbor comment about appending filenames!