17 C
Jaipur
Sunday, December 6, 2020

How to go to Line X in Nano? – Linux Hint

Must read

Spence vs Garcia live stream: how to watch the fight online anywhere and for free

Having survived a near fatal car crash, Errol Spence Jr returns to the ring on Saturday to defend his unified Welterweight titles against two-weight...

Top Christmas gifts for PlayStation gamers: from the PS5 to cool merchandise

Struggling to think of the best Christmas gifts for PlayStation gamers? When you eventually get a wish list from your family or friends that...

mobile Internet: US House Democrats adopt mobile internet voting for leadership contests – Latest News

US lawmakers used a mobile phone app over the last two weeks to remotely cast votes for the first time, according to technologists and...

Thanks PS5 and Xbox Series X for making ray tracing cool

When the Nvidia GeForce RTX 2080 and RTX 2080 Ti made their debut way back at Gamescom 2018, the way Nvidia CEO Jensen Huang...

There are two different methods of going to line X in the nano editor which we will discuss one by one over here.

Note: Both of these solutions have been tested with Ubuntu 20.04.

Method # 1:

This method is useful when you do not have the file open in front of you at the moment. However, you still want to jump to a particular line as soon as you open that file with the nano editor. You can do this simply by typing the following command in your terminal:

sudo nano +LineNumber Testing.txt

Replace LineNumber with the exact line number where you want to jump.

When you will run the above-mentioned command, the specified file will open with the nano editor and the cursor will be pointing towards the line that you have specified as you can witness from the image shown below:

Method # 2:

This method is useful when the file has already been opened with the nano editor. You just have to press Ctrl+ Shift+ – key combination. After pressing it, you will notice that the nano editor asks you to enter a line number of your choice to which you want to jump. Provide the desired line number and then press the Enter key:

Once you will hit the Enter key, your cursor will immediately start point to the beginning of the line that you have just specified.

In this way, you can jump to any particular line in a file while using the nano editor. These solutions are especially helpful if you are working with very huge files in which it is difficult to manually traverse from one line to another. You can simply specify the desired line number and you will be right there at the desired line by using any of these methods.

Source link

- Advertisement -

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

Spence vs Garcia live stream: how to watch the fight online anywhere and for free

Having survived a near fatal car crash, Errol Spence Jr returns to the ring on Saturday to defend his unified Welterweight titles against two-weight...

Top Christmas gifts for PlayStation gamers: from the PS5 to cool merchandise

Struggling to think of the best Christmas gifts for PlayStation gamers? When you eventually get a wish list from your family or friends that...

mobile Internet: US House Democrats adopt mobile internet voting for leadership contests – Latest News

US lawmakers used a mobile phone app over the last two weeks to remotely cast votes for the first time, according to technologists and...

Thanks PS5 and Xbox Series X for making ray tracing cool

When the Nvidia GeForce RTX 2080 and RTX 2080 Ti made their debut way back at Gamescom 2018, the way Nvidia CEO Jensen Huang...

Spider-Man: Miles Morales has the most authentic character of 2020

Earth-616 is at peak Spidey fandom. After the successful integration of bringing Spider-Man into the ever-expanding MCU, the character was then reinvigorated in video...