LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-19-2012, 07:20 PM   #1
sustik
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Rep: Reputation: Disabled
exit behavior of less (the pager)


When I hit q to leave less, the displayed contents disappear. I thought that that cannot be helped, until I saw on a linux machine the following behavior: upon pressing q and leaving less) the portion of the file displayed stayed on the screen.

Unfortunately, I did not ask how that was done. I checked the man page for less and there is nothing relevant.

I am running debian wheezy.

Thanks!
 
Old 01-19-2012, 07:51 PM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
Take a look at this page

While I have not tried it myself, read the "Can less leave the screen alone when it quits?" question.
 
1 members found this post helpful.
Old 01-19-2012, 10:27 PM   #3
sustik
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks!

And indeed, knowing the switch allowed me to find in the man page:

-X or --no-init
Disables sending the termcap initialization and deinitialization
strings to the terminal. This is sometimes desirable if the
deinitialization string does something unnecessary, like clear‐
ing the screen.

Thanks! I am using the following alias that benefits from the above:

dir () {
ls --color=always -h -t -g -G -B --time-style=iso "$@" | less -R -X
}
 
  


Reply



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
[SOLVED] exit in script files cause konsole terminal itself to exit Star_Gazer Programming 11 04-12-2010 08:32 AM
Warning: at kernel/exit.c:814 do exit() (Tainted: P ) <- nVidia video problem? Hitboxx Fedora 2 10-06-2007 09:47 PM
Fluxbox pager ilikejam Linux - Software 2 08-04-2006 10:22 PM
tuning gnome pager or alternative pager ? Bogdan Linux - Software 1 06-01-2006 07:25 PM
blackbox pager schwartze Linux - Newbie 0 02-27-2004 11:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:42 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