Empty Contents of Specified File Without Deleting via Command Line
If you’re working at the command line and need to quickly empty the contents of a file, you can do so by throwing a greater than symbol and a space in front of the filename in question.

