Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
Press h to see help. –  choroba Aug 20 '13 at 14:08
    
@choroba Thanks. –  Hap Aug 20 '13 at 14:14

1 Answer 1

up vote 5 down vote accepted

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.

share|improve this answer
    
I tried Ctrl C, but that doesn't seem to work in this case. But 'Q' did the trick. Thank you for that, and the less vs bash clarification. –  Hap Aug 20 '13 at 14:17
    
See also: what to do when ctrl-c can't kill a process? –  slhck Aug 20 '13 at 14:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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