How to quickly clear Linux file content

  
                

In the Linux operating system, how to quickly clear the contents of a file? The following small series will give you the code to quickly clear the contents of the file, I hope to help beginners.

code is as follows:

$: "filename

$" filename

$ echo & ldquo; & rdquo; "filename

$ echo ” filename

$ cat /dev/null ” filename

The above is a quick way to empty the contents of the file under Linux, if you want to clear the contents of the file, but not When you know how to do it, try the methods described above.

Copyright © Windows knowledge All Rights Reserved