LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-25-2009, 06:56 AM   #1
rtrahan
Member
 
Registered: Jan 2009
Location: Georgia
Distribution: OpenSuse Fedora
Posts: 64

Rep: Reputation: 17
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
 
Old 01-25-2009, 06:59 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
try to press
q
or CTRL-C
 
Old 01-25-2009, 07:14 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
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
Code:
cat > textfile
other commands don't receive input from the terminal and you will stop them using Ctrl-C. For exemple when using
Code:
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
Code:
$ command
<Ctrl-Z>
$ # prompt returns here and the job is suspended
$ bg # this put the last (previous) job in background. 
Hope this helps.
 
  


Reply

Tags
prompt, terminal



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
manager of PID file quit without update while starting mysqld abyabahai LinuxQuestions.org Member Intro 0 11-19-2008 11:54 PM
how to delete last number/word of a file and incude file count at the end of the chennaiguy Linux - Newbie 2 02-18-2008 09:08 PM
Don't know why file downloads quit before they're done royeo Linux - Newbie 3 12-07-2006 07:43 PM
cat file but don't quit Ephracis Linux - Software 2 08-26-2006 12:56 AM
Mplayer; quit at end of movie hamish Linux - Software 4 04-19-2006 01:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration