Ubuntu: How do I save a line in terminal without runninig it? [duplicate]


This question already has an answer here:

Is there an option to abandon the current command and later go back with the up arrow?

Sometimes when I want to open multiple files at once I want to check "dir" to see if I got the right paths. How can I write a new command while still saving the command I was about to write so I can go back to it fast after?

I could use two separate terminal windows, but I'd like to know how to this in one.


First I want to open three files, like this: vim -p js/ajax_nav.js first_page.php...

But wait! I forgot what the name of the third file! How do I save the already written line in the memory so I can look up the filename with "dir" and possibly "cd", to return back to the line above? So I'll only have to add the third name.


Press Ctrl+U to "cut" the command you were writing (actually, everything that is before the cursor).

Then, later, press Ctrl+Y to "paste" that command.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »