0

How to empty the content of a file in Linux CentOS Distro

Hello,

Is there any possibility to empty the content of a file through a command On CentOs 7.6?

otwol
asked Nov 5, 2019
1 Answer
0

On CentOS Distro,to empty the file contents,use the following commands

truncate -s 0 filename

here in the above command -s indicates size where we are resizing the file to zero

View More
linuxhelp
answered Nov 7, 2019
Your Answer
||||
x
 
100:0