Clearing / Emptying Entire File From Nano Linux Terminal

Asphyxia

Owner
Administrator
Apr 25, 2015
1,844
2
2,197
327
Have you ever been inside of a terminal and started deleting things then decided you just want to delete the whole damn thing?

Well, here is how you can easily do it with nano:
Code:
Hold Alt + \, A, /
Ctrl + K

Another option:
Code:
Hold Alt + \, T

The file opened in nano is empty, what a piece of art. ;)

Look at this, this whole forum could not even find the answer: http://ubuntuforums.site/showthread.php?t=1166882

If you are in the same pwd (present working directory) as the file, just use this:
Code:
>filename
 
Last edited:
Top