Languages

Linux - how to empty the file from command line?

13 points
Asked by:
Teilsa
1315

How to remove the content of a file under linux from command line level?
I do not want to remove the entire file and create new file.
I just want to clear the entire file to 0 bytes.
What is the best way to do it?

1 answer
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join