Delete files before certain date

If you have a directory with a large amount of file, you may want to delete all files before a certain date.

With the below example, we can delete all files before 2016-01-01 00:00.

touch -t 201601010000 /tmp/timestamp

find . -type f ! -newer /tmp/timestamp -delete