1

I run the bash command "less" on a .txt. After printing out the lines in the file, the name of the file and "(END) " is printed. But I do not get a command prompt again.

Other than closing the terminal window and opening a new one, I don't know how to proceed.

So, how do I move past this "(END) " to get a prompt?

  • 2
    Press h to see help. – choroba Aug 20 '13 at 14:08
5

When less reaches the end of the file, it displays (END). Just hit Q to return to the prompt.

For general reference, in the *nix world CtrlC will stop the current process, that will also return you to the terminal (though this does not work for less as you found out). Alternatively, you can use CtrlZ to send the current process to the background. You can then bring it back with fg. See help fg and help bg for details.

Oh and less is not a bash command, it is a program in its own right and has nothing to do with bash.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.