Jump to Top or Bottom of File Using the Nano Linux Command

When viewing and editing files, Linux’s nano command can be very useful. One of the primary reasons for my usage of nano is reading log files that can be hundreds, if not thousands of lines long. In this scenario one of the most useful commands required is to quickly jump to the top and bottom of the file, especially seeing as log files are normally date ordered. As a result I wanted to share with you how to do this in just a couple of keystrokes.

Jump to the bottom of the file

The are two steps involved in doing this. The first is to press ‘Ctrl + _’ (underscore). This will ask for a line number at which point then press ‘Ctrl + V’. This will move the cursor directly to the bottom of the file.

Jump to the top of the file

This process is similar to the above but instead of pressing ‘Ctrl + V’, press ‘Ctrl + Y’. Voila, you’re back at the top in just four keystrokes.

Share

Related Posts

- Get Size of Files in a Linux Directory Modified in the Past 24 Hours
- Preventing Direct File Access Using a .htaccess File
- Getting Skype 5.3.0 to Work on Windows 7
- Losing CodeIgniter Sessions
- Resolving the CodeIgniter “No Input File Specified” Error

Leave a Reply

Spam protection by WP Captcha-Free