Clear all contents of a file from command line
echo '' > path/to/file
or
cat /dev/null > path/to/file
Written by Shih Oon Liong
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Cli
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#