[Linux] Clearing the file content without deleting it
October 11, 2012 in Linux
In some situations, you may need to clear the file content without deleting the file. In order to do this in Linux environment, you can simply run the following command:
cat /dev/null > "Your file path"
Or:
> “Your file path”