-   Linux - Newbie (
-   -   End of File In Terminal Cannot Quit Sometimes (

rtrahan 01-25-2009 07:56 AM

End of File In Terminal Cannot Quit Sometimes
Sometimes when I do a "ls | less" I will get to the end of the file and most of the time I can press CTRL+ D to get back to the prompt. Other time it does not work and I have to click on close and start over? Any other ways to get back to prompt?

Thanks in advance

repo 01-25-2009 07:59 AM

try to press

colucix 01-25-2009 08:14 AM

To exit from less, you can press 'q'. Other applications may have a different terminator, depending on the fact they expect an EOF (Ctrl-D) or a termination signal (Ctrl-C). For example you can use Ctrl-D to send the "end of input" signal when using

cat > textfile
other commands don't receive input from the terminal and you will stop them using Ctrl-C. For exemple when using

tail -f logfile
Another signal is Ctrl-Z that means suspend. This is useful when you launch a command from the terminal and you want to put it in background, for example

$ command
$ # prompt returns here and the job is suspended
$ bg # this put the last (previous) job in background.

Hope this helps.

All times are GMT -5. The time now is 09:03 PM.