LinuxQuestions.org
Review your favorite Linux distribution.
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 03-10-2015, 01:16 PM   #1
urello
LQ Newbie
 
Registered: Jul 2014
Posts: 13

Rep: Reputation: Disabled
Question How to keep output after exit less?


Hi,
If command's expected output doesn't fit the screen I used to scroll it via less command
Code:
/sbin/ifconfig |less
But when i press 'q', all output is immediately flushed. I've recently moved from win8 to ubuntu and this behaviour is new for me. PuTTY keeped output for me after i exited less.
How to keep output? I use Xterm.
 
Old 03-10-2015, 01:22 PM   #2
Miati
Member
 
Registered: Dec 2014
Distribution: Linux Mint 17.*
Posts: 326

Rep: Reputation: 106Reputation: 106
Redirect it to a file instead?

Code:
/sbin/ifconfig > outputof_ifconfig
Then you can open the file in any manner you wish

> means to create or overwrite a existing file with the data.
As a alternative, >> means create or append a existing file with the data.

Last edited by Miati; 03-10-2015 at 01:27 PM.
 
Old 03-10-2015, 01:29 PM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885
http://www.linuxquestions.org/questi...screen-938187/

In short, use less with the -X option, either manually or set up your environment accordingly.
 
Old 03-10-2015, 02:44 PM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
in ~/.bashrc
Code:
export LESS="LQRocks"
then in same shell
Code:
source ~/.bashrc
man bash
and quit.

Last edited by Habitual; 03-10-2015 at 02:46 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
exit(communication error), terminated by calling exit(), return code: 255 miliboy Linux - Newbie 11 02-27-2013 01:51 PM
[SOLVED] How-to supress output when exit code not 0 ? Linux_Kidd Programming 11 10-24-2011 08:29 AM
Warning: at kernel/exit.c:814 do exit() (Tainted: P ) <- nVidia video problem? Hitboxx Fedora 2 10-06-2007 09:47 PM
cannot exit normally after "nohup blablabla > output.txt &" LQYY Linux - Newbie 1 12-14-2004 10:02 AM
kppp exit output 16 Greek Acrobat Linux - Networking 2 09-04-2004 02:11 PM

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

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