Zabo
Zabo

Reputation: 283

How to clear the screen of NANO-Editor , to open a NEW textfile?

How to clear the screen of NANO-Editor , to open a NEW textfile ?

A file is loaded.

When i read a new file with Ctrl + R the file is INSERTED in the actual file.

What i want is to unload and clear the screen first. a empy nano.

Then read a NEW file IN !!!

Thats all.

Thanks.

Upvotes: 1

Views: 3228

Answers (1)

Camilo Peña
Camilo Peña

Reputation: 11

There are couple options you can use:

Clean the content of the "existing" file (within nano):

Go to the start of the file: Ctrl + W + Y
Mark the text: Ctrl + 6
Go to the end of the file (setting the mark): Ctrl + W + V
Cut the text: Ctrl + K
Insert the new file/content using Ctrl + R

Clean the content of the "existing" file (prior to open nano):

If you have content already in a file you want to open, you can execute this command:

> file-name && nano file-name

The > will clean your file prior to open it. and then you can proceed to import the new content.

Hope one of above options works for you :)

Upvotes: 1

Related Questions