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.
Found this useful? Everything here is free and stays that way. If it saved you an afternoon, you can buy me a coffee.