How to empty file using “>” operator?

How to empty file using “>” operator?

Suppose you want to empty file from command prompt.

Here is the way how you do:

$ > [filepath]

Suppose you want to delete log file then try this:

 $ > ./logfile 

Enjoy Linux.

Leave a Reply

Your email address will not be published. Required fields are marked *