A nice trick to truncate a file in linux
I alway use /dev/null to truncate a file. However, just found that you can use a simple command:
:>filename
to truncate a file to zero size in linux.
Labels: code
My technical memo and random thoughts, mostly in database systems, business intelligence, and information security and privacy.
I alway use /dev/null to truncate a file. However, just found that you can use a simple command:
Labels: code
0 Comments:
Post a Comment
<< Home