0

How to empty a file contents?

Hi, i want to empty the contents inside a file but i dont want to remove the file, How can i do it?

ajinfernando
asked Feb 22, 2018
1 Answer
0

You can use the truncate command to empty the values inside a file as shown below

truncate -s 0 file1
View More
parthiban
answered Mar 4, 2018
Your Answer
||||
x
 
100:0