Thursday, 3 September 2015

How to Empty a file

 Empty a file using command(terminal)

 Method 1.

$ > test.txt

  empty a file
for when you want to flush all content from a file without removing it.

Method 2.

 $  truncate -s0 1.txt

Related Posts :

Linux Tutorial for Beginners

Importance command for Java developer

No comments:

Post a Comment