方法一: echo "" >test.log 方法二: > test.log 方法三: cat /dev/null >test.log 转载于:https://www.cnblogs.com/liang545621/p/7528509.html