Nano

How do you get to the Last Line in Nano?

While working with the nano editor, you might want to jump to the last line of a file without having to scroll through the entire file. There are two methods of doing this which are stated below:

Method # 1: Using the “Alt+ /” Shortcut Combination:

The first thing that you need to do is to launch a file with the nano editor using the terminal command shown below:

sudo nano Testing.txt

You can provide any file name instead of Testing.txt according to the file that you want to open.

Once your file will open with the nano editor, the cursor will be pointing at the beginning of the file. Just press “Alt+ /” (Alt+ Forward Slash) and you will notice that your cursor has shifted to the end of the last line of your file as shown in the following image:

Method # 2: Using the “Ctrl+ W” and “Ctrl+ V” Shortcut Combinations:

Open any desired file with nano editor through the command stated above. Once your file is opened in the nano editor, press “Ctrl+ W”. Doing this will make a Search prompt to appear at the end of your file as shown in the image below:

Now press “Ctrl+ V” after that Search prompt appears and you will notice that your cursor is now pointing to the end of the last line of your file as shown in the following image:

These methods prove to be helpful when you are working with large files and you quickly want to navigate to the end of the file or the last line of the file. These files can either be text files or any other type of file. The methods of navigating to the last line of any file in the nano editor will remain the same.

About the author

Karim Buzdar

Karim Buzdar

Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. He blogs at LinuxWays.