1. 本人用的最多,感觉也是最方便的: > filename.log 2. : > filename.log 3. cat /dev/null > filename.log 转载于:https://www.cnblogs.com/vdvvdd/p/7559915.html