A quick way to truncate files on Mac and Linux systems

A short-hand method of truncating files is by using this syntax:

: > /path/to/filename.txt

Once it has ran then the files content will be removed and the file itself left in place.