Fedora Linux Support Community & Resources Center
  #1  
Old 26th July 2012, 07:20 AM
tech291083 Offline
Registered User
 
Join Date: Sep 2006
Posts: 1,019
linuxfirefox
Output not too long

Hi,

Whenever the output of a command (in a terminal) is too long and expanding in real time thereby not fitting in one screen one has to press the Space bar to go down one screen, but how do I get one screen back? Yes, with the mouse one can scroll up and down. But there must be a key one has to use to move up and down the screen as well, I guess. Thanks.

PS: By mistake I seem to have given the wrong title to this thread. It should read Output too long. Thanks.


As given below sometimes the output is too long to view in one screenful.

Code:
root       575  0.0  0.1   2708   588 ?        Ss   10:20   0:00 /usr/sbin/atd -
avahi      581  0.0  0.0   3300    16 ?        S    10:20   0:00 avahi-daemon: c
root       589  0.0  0.1   2548   584 ?        Ss   10:20   0:00 /usr/sbin/mcelo
dbus       593  0.0  0.3  11956  1544 ?        Ssl  10:20   0:00 /bin/dbus-daemo
root       600  0.0  0.1   5320   708 ?        S    10:20   0:00 /bin/bash /usr/
chrony     615  0.0  0.2   3128  1012 ?        S    10:20   0:00 /usr/sbin/chron
root       625  0.0  0.1   5536   820 ?        Ss   10:20   0:00 /usr/sbin/crond
root       632  0.0  0.1  11500   612 ?        S<sl 10:20   0:00 /sbin/audispd
root       637  0.0  0.0   2968   468 ?        S<   10:20   0:00 /usr/sbin/sedis
root       662  0.0  0.0      0     0 ?        S<   10:20   0:00 [iscsi_eh]
root       665  0.0  0.0      0     0 ?        S<   10:20   0:00 [ib_mcast]
root       666  0.0  0.0      0     0 ?        S<   10:20   0:00 [ib_cm]
root       667  0.0  0.0      0     0 ?        S<   10:20   0:00 [iw_cm_wq]
root       668  0.0  0.0      0     0 ?        S<   10:20   0:00 [ib_addr]
root       669  0.0  0.0      0     0 ?        S<   10:20   0:00 [rdma_cm]
root       679  0.0  0.0      0     0 ?        S<   10:20   0:00 [cnic_wq]
root       680  0.0  0.0      0     0 ?        S<   10:20   0:00 [bnx2i_thread/]
root       686  0.0  0.0   6076   252 ?        S    10:20   0:00 /usr/lib/udev/u
root       687  0.0  0.0   6076   196 ?        S    10:20   0:00 /usr/lib/udev/u
root       690  0.0  0.0  28044   408 ?        Ssl  10:20   0:00 iscsiuio
root       696  0.0  0.0   2796   432 ?        Ss   10:20   0:00 iscsid
root       699  0.0  0.4  25400  2360 ?        Sl   10:20   0:00 /usr/libexec/po
root       703  0.0  0.6   3256  3236 ?        S<Ls 10:20   0:00 iscsid
root       707  0.0  0.2   5460  1300 ?        S    10:20   0:00 /usr/sbin/modem
root       708  0.0  0.2   4688  1020 ?        Ss   10:20   0:00 /usr/sbin/bluet
nobody     761  0.0  0.0   2812   352 ?        S    10:20   0:00 /sbin/dnsmasq -
root       824  0.0  0.1   2716   524 ?        Ss   10:21   0:00 /sbin/rpcbind -
root       840  0.0  0.0      0     0 ?        S<   10:21   0:00 [rpciod]
rpcuser    852  0.0  0.1   2988   692 ?        Ss   10:21   0:00 /sbin/rpc.statd
root       965  0.0  0.1   3184   652 ?        Ss   10:21   0:00 /usr/libexec/pc
root      1031  0.0  0.2   5744  1256 ?        Ss   10:21   0:00 /usr/sbin/lxdm-
root      1037  3.7  1.9  24276  9432 tty1     Rs+  10:21   3:34 /usr/bin/X -bac
root      1066  0.0  0.2  20984  1096 ?        Ssl  10:23   0:00 /usr/sbin/conso
john    1131  0.0  0.2  14164  1068 ?        Ssl  10:23   0:00 /usr/bin/lxsess
john    1141  0.0  0.0   3780   204 ?        S    10:23   0:00 dbus-launch --s
john    1142  0.0  0.1  12044   704 ?        Ssl  10:23   0:00 /bin/dbus-daemo
john    1215  0.0  0.2  29364  1400 ?        Sl   10:23   0:00 /usr/libexec/im
john    1218  0.0  0.2  10624  1112 ?        S    10:23   0:00 /usr/libexec/gv
john    1296  0.0  0.7  16268  3740 ?        S    10:23   0:02 openbox --confi
john    1299  0.1  1.2 100876  5920 ?        S    10:23   0:10 lxpanel --profi
john    1300  0.0  0.8 112740  4316 ?        S    10:23   0:00 pcmanfm --deskt
john    1301  0.0  0.2   7760  1004 ?        S    10:23   0:00 xscreensaver -n
john    1303  0.0  0.5 111356  2684 ?        Sl   10:23   0:00 abrt-applet
john    1305  0.0  0.7  40512  3516 ?        S    10:23   0:00 /usr/bin/python
john    1308  0.0  0.2   7956  1232 ?        S    10:23   0:00 /usr/libexec/me
john    1359  0.0  0.2  32292  1172 ?        Sl   10:23   0:00 /usr/libexec/dc
john    1362  0.0  0.2  53720  1472 ?        Sl   10:23   0:00 zeitgeist-datah
john    1373  0.0  0.3  41844  1636 ?        Sl   10:23   0:00 /usr/bin/zeitge
john    1376  0.0  0.6 207568  3364 ?        Sl   10:23   0:00 nm-applet
john    1378  0.0  0.6 261500  3028 ?        Sl   10:23   0:00 pnmixer
john    1380  0.0  0.4  20776  2416 ?        Sl   10:23   0:00 /usr/libexec/gv
john    1383  0.0  0.5  21876  2772 ?        S    10:23   0:00 /usr/bin/seappl
root      1384  0.0  0.4  41712  2320 ?        Ssl  10:23   0:02 /usr/lib/udisks
john    1393  0.0  0.2  28604  1376 ?        Sl   10:23   0:00 /usr/libexec/ze
root      1407  0.0  0.4  48744  2320 ?        Sl   10:23   0:02 /usr/bin/python
john    1409  0.0  0.3  28112  1852 ?        Sl   10:23   0:00 /usr/libexec/lx
john    1412  0.0  0.0   4232   348 ?        S    10:23   0:00 /bin/cat
john    1415  2.2  0.1 101164   944 ?        S<l  10:23   2:04 /usr/bin/pulsea
rtkit     1416  0.0  0.1  21168   752 ?        SNsl 10:23   0:00 /usr/libexec/rt
john    1424  0.0  0.2   6984  1124 ?        S    10:23   0:00 /usr/libexec/gc
root      1427  0.0  0.1  12784   932 ?        Ss   10:23   0:00 /usr/sbin/cupsd
root      1432  0.0  0.1  14848   856 ?        S    10:23   0:00 /sbin/dhclient
john    1488 11.4 15.4 570016 75936 ?        Sl   10:24  10:27 /usr/lib/firefo
john    1514  0.0  0.2  33884  1092 ?        Sl   10:24   0:00 /usr/libexec/at
john   27539  0.4  1.9 114740  9496 ?        Sl   11:17   0:09 lxterminal
john   27540  0.0  0.1   2220   636 ?        S    11:17   0:00 gnome-pty-helpe
john   27541  0.0  0.5   6504  2680 pts/1    Ss   11:17   0:00 /bin/bash
root     27607  0.0  0.4   7060  2300 pts/1    S    11:17   0:00 su
root     27613  0.0  0.6   6916  3056 pts/1    S    11:17   0:00 bash
root     27693  0.0  0.0      0     0 ?        S    11:19   0:00 [kworker/0:0]
root     27701  0.0  0.5  28540  2536 ?        Ssl  11:20   0:00 /usr/libexec/up
john   27745  0.3  2.6  72024 13124 ?        S    11:20   0:08 /usr/lib/nsplug
root     27796  0.0  0.0      0     0 ?        S    11:24   0:00 [kworker/0:1]
root     27829  2.0 15.9 119072 78596 pts/1    S+   11:28   0:33 /usr/bin/python
john   28233  0.1  0.5   6504  2944 pts/0    Ss   11:53   0:00 /bin/bash
root     28318  0.0  0.0   4212   472 ?        S    11:55   0:00 sleep 60
__________________
fedoralinuxcommands.blogspot.com


All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

Last edited by tech291083; 26th July 2012 at 07:29 AM.
Reply With Quote
  #2  
Old 26th July 2012, 07:35 AM
ah7013 Offline
Registered "Cashew" User
 
Join Date: May 2010
Location: Adelaide, Australia
Age: 19
Posts: 665
linuxfirefox
Re: Output not too long

Have you tried the Shift+PageUp (to go up) and Shift+PageDown (to go down) key combinations?
__________________
15" MacBook Pro (Retina) - OS X 10.9 | 11" MacBook Air - OS X 10.9 | HP 8510w - Mageia 4 x86_64
Reply With Quote
  #3  
Old 26th July 2012, 09:59 AM
george_toolan Offline
Registered User
 
Join Date: Dec 2006
Posts: 2,076
linuxfirefox
Re: Output not too long

Which pager are you using?

Code:
ps aux | less
With less you can use the b key to go backwards one screen or h to display the help screen.
Reply With Quote
  #4  
Old 26th July 2012, 02:07 PM
tech291083 Offline
Registered User
 
Join Date: Sep 2006
Posts: 1,019
linuxfirefox
Re: Output not too long

Quote:
Originally Posted by george_toolan View Post
Which pager are you using?

Code:
ps aux | less
With less you can use the b key to go backwards one screen or h to display the help screen.
Thanks a lot. I knew that b key, but forgot that I need to use it with the less flag/parameter/condition. Thanks. I can now scroll one screen down with the spacebar and one screen back with the b key.

---------- Post added at 06:07 AM ---------- Previous post was at 05:59 AM ----------

One more question though, how can I see the entire screen output in a session? With SHIFT+Page Up I can only go back a certain lines. For example this is what I am doing in a terminal as right now. I have cut some lines as this is just an example. But I can't go back to the very first line when I started this terminal session. I hope you got my point. Thanks.

Code:

(29/64): iwl6000-firmware-9.221.4.1-7.fc17.noarch.rpm    | 154 kB     00:02     
(30/64): iwl6000g2a-firmware-17.168.5.3-7.fc17.noarch.rp | 156 kB     00:02     
(31/64): iwl6000g2b-firmware-17.168.5.2-7.fc17.noarch.rp | 297 kB     00:04     
(32/64): iwl6050-firmware-41.28.5.1-7.fc17.noarch.rpm    | 230 kB     00:03     
(33/64): kpartx-0.4.9-26.fc17.i686.rpm                   |  33 kB     00:00     
(45/64): nc-1.109.20120711-1.fc17.i686.rpm               |  25 kB     00:00     
(46/64): plymouth-system-theme-0.8.5-0.2012.04.27.1.fc17 |  24 kB     00:00     
(47/64): policycoreutils-sandbox-2.1.11-18.fc17.i686.rpm | 130 kB     00:01     
(48/64): powertop-2.0-3.fc17.i686.rpm                    | 152 kB     00:02     
(56/64): selinux-policy-3.10.0-140.fc17.noarch.rpm       | 185 kB     00:02     
(57/64): selinux-policy-targeted-3.10.0-140.fc17.noarch. | 3.7 MB     01:02     
(58/64): shared-mime-info-1.0-4.fc17.i686.rpm            | 351 kB     00:05     
(59/64): sqlite-3.7.11-3.fc17.i686.rpm                   | 356 kB     00:05     
(61/64): vim-minimal-7.3.556-1.fc17.i686.rpm             | 347 kB     00:05     
(62/64): xorg-x11-server-Xephyr-1.12.2-4.fc17.i686.rpm   | 875 kB     00:14     
(63/64): xscreensaver-extras-5.18-2.fc17.i686.rpm        | 1.3 MB     00:22     
(64/64): zukini-common-20120708-1.fc17.noarch.rpm        |  16 kB     00:00     
--------------------------------------------------------------------------------
Total                                            52 kB/s |  24 MB     07:47     
Running Transaction Check
Running Transaction Test
__________________
fedoralinuxcommands.blogspot.com


All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo
Reply With Quote
  #5  
Old 27th July 2012, 03:05 AM
ah7013 Offline
Registered "Cashew" User
 
Join Date: May 2010
Location: Adelaide, Australia
Age: 19
Posts: 665
linuxfirefox
Re: Output not too long

Quote:
Originally Posted by tech291083 View Post
One more question though, how can I see the entire screen output in a session? With SHIFT+Page Up I can only go back a certain lines. For example this is what I am doing in a terminal as right now. I have cut some lines as this is just an example. But I can't go back to the very first line when I started this terminal session. I hope you got my point. Thanks.
Is this in a terminal emulator (e.g. Konsole or gnome-terminal) or in a tty?
__________________
15" MacBook Pro (Retina) - OS X 10.9 | 11" MacBook Air - OS X 10.9 | HP 8510w - Mageia 4 x86_64
Reply With Quote
  #6  
Old 27th July 2012, 11:10 AM
george_toolan Offline
Registered User
 
Join Date: Dec 2006
Posts: 2,076
linuxfirefox
Re: Output not too long

With Gnome Terminal you can edit the Profile Preferences and increase the line buffer. Default is 512 lines.
Attached Thumbnails
Click image for larger version

Name:	gnome_terminal_buffer.png
Views:	43
Size:	25.8 KB
ID:	23536  
Reply With Quote
  #7  
Old 31st July 2012, 06:39 AM
tech291083 Offline
Registered User
 
Join Date: Sep 2006
Posts: 1,019
windows_7ie
Re: Output not too long

Quote:
Originally Posted by ah7013 View Post
Is this in a terminal emulator (e.g. Konsole or gnome-terminal) or in a tty?
Terminal, thanks
__________________
fedoralinuxcommands.blogspot.com


All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo
Reply With Quote
  #8  
Old 31st July 2012, 06:52 AM
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,547
linuxfirefox
Re: Output not too long

Code:
SUMMARY OF LESS COMMANDS

      Commands marked with * may be preceded by a number, N.
      Notes in parentheses indicate the behavior if N is given.

  h  H                 Display this help.
  q  :q  Q  :Q  ZZ     Exit.
 ---------------------------------------------------------------------------

                           MOVING

  e  ^E  j  ^N  CR  *  Forward  one line   (or N lines).
  y  ^Y  k  ^K  ^P  *  Backward one line   (or N lines).
  f  ^F  ^V  SPACE  *  Forward  one window (or N lines).
  b  ^B  ESC-v      *  Backward one window (or N lines).
  z                 *  Forward  one window (and set window to N).
  w                 *  Backward one window (and set window to N).
  ESC-SPACE         *  Forward  one window, but don't stop at end-of-file.
  d  ^D             *  Forward  one half-window (and set half-window to N).
  u  ^U             *  Backward one half-window (and set half-window to N).
  ESC-)  RightArrow *  Left  one half screen width (or N positions).
  ESC-(  LeftArrow  *  Right one half screen width (or N positions).
  F                    Forward forever; like "tail -f".
  r  ^R  ^L            Repaint screen.
  R                    Repaint screen, discarding buffered input.
        ---------------------------------------------------
        Default "window" is the screen height.
        Default "half-window" is half of the screen height.
 ---------------------------------------------------------------------------
.....more stuff truncated.....
If it's terminal emulator behavior and not 'less', then pgup pgdn is a good bet.
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe

Last edited by stevea; 31st July 2012 at 06:56 AM.
Reply With Quote
  #9  
Old 1st August 2012, 01:33 PM
ah7013 Offline
Registered "Cashew" User
 
Join Date: May 2010
Location: Adelaide, Australia
Age: 19
Posts: 665
linuxfirefox
Re: Output not too long

Quote:
Originally Posted by tech291083 View Post
Terminal, thanks
Do you mean the the XFCE Terminal? If so you can just go to Edit->Preferences and increase the scrollback amount.
Attached Thumbnails
Click image for larger version

Name:	snapshot2.png
Views:	46
Size:	51.5 KB
ID:	23557  
__________________
15" MacBook Pro (Retina) - OS X 10.9 | 11" MacBook Air - OS X 10.9 | HP 8510w - Mageia 4 x86_64
Reply With Quote
  #10  
Old 24th August 2012, 02:12 PM
tech291083 Offline
Registered User
 
Join Date: Sep 2006
Posts: 1,019
linuxfirefox
Re: Output not too long

I am using GNOME Terminal 3.2.1 and it says A terminal emulator for the GNOME desktop on it when I select About under the Help menu. Thanks. My problem is not gone yet. I simply can't scroll back in order to copy and paste the long outputs some commands generate, thanks.
__________________
fedoralinuxcommands.blogspot.com


All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo
Reply With Quote
  #11  
Old 24th August 2012, 03:47 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,658
linuxfirefox
Re: Output not too long

One alternative that doesn't work for everything is to use the "script" utility.

It creates a log of everything output to the terminal. This can be paged through as much as you want from another terminal.

It can get a bit unreadable as escape sequences are also recorded, and terminal level editing gets crazy... but everything is there.
Reply With Quote
  #12  
Old 24th August 2012, 04:14 PM
george_toolan Offline
Registered User
 
Join Date: Dec 2006
Posts: 2,076
linuxfirefox
Re: Output not too long

I already told you last month how to increase the buffer for Gnome Terminal 3.2.1, but you can also redirect the output to a file like

Code:
ps aux > psaux.txt
or even better use the tee command to display it on screen and log it to a file
Code:
ps aux | tee psaux.txt
Reply With Quote
  #13  
Old 26th August 2012, 06:11 AM
tech291083 Offline
Registered User
 
Join Date: Sep 2006
Posts: 1,019
linuxfirefox
Re: Output not too long

Quote:
Originally Posted by jpollard View Post
One alternative that doesn't work for everything is to use the "script" utility.

This sounds good, but how do I install this utility and how do I use the same? Thanks.

---------- Post added at 10:11 PM ---------- Previous post was at 10:06 PM ----------

Quote:
Originally Posted by george_toolan View Post
I already told you last month how to increase the buffer for Gnome Terminal 3.2.1,

Yes, you did. But it did not work, I chose Unlimited option under the scrollback option. The problem unfortunately is still there. Please suggest something, thanks.
__________________
fedoralinuxcommands.blogspot.com


All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo
Reply With Quote
  #14  
Old 26th August 2012, 11:17 AM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,658
linuxfirefox
Re: Output not too long

The script utility should already be installed as it is in the package "util-linux"
Reply With Quote
  #15  
Old 26th August 2012, 12:30 PM
george_toolan Offline
Registered User
 
Join Date: Dec 2006
Posts: 2,076
linuxfirefox
Re: Output not too long

Code:
man script
What exactly are you doing and which programs are you using?

The Terminal scrollback buffer does not work if you pipe the output to another program like less.
Reply With Quote
Reply

Tags
long, output

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
tar -czf taking long long time shariqnitt EOL (End Of Life) Versions 3 31st January 2011 12:17 PM
Command display output on console and simultaneously save the command and its output satimis Linux Chat 10 1st August 2008 03:02 AM
output a file to ternimal but keep the output updated Saint Mike Using Fedora 2 30th December 2006 11:22 AM


Current GMT-time: 04:13 (Wednesday, 16-04-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat