terminal list won't fit on one page

General discussion Forum. All YDL related question which are not Install or Beginner questions.

terminal list won't fit on one page

Postby bonedome » 12 May 2009, 14:00

Hello
ok here's the problem when I type
Code: Select all
ffmpeg -h
in a terminal there are so many options that when you scroll to the top of the page the top half of ffmpeg help is missing and the same goes for any long list, does anyone know a command that will show the list in full or top and bottom half seperately ?
60Gb ps3 otheros awol. currently playing:bad company and farcry 2 again (seeing how far I can get using permadeath principle)update: regretfully Warren Clyde was involved in a shootout south of Pala and killed when he was hit by a land rover. RIP Warren
User avatar
bonedome
ydl guru
ydl guru
 
Posts: 755
Joined: 07 Aug 2008, 16:03
Location: uk

Re: terminal list won't fit on one page

Postby CronoCloud » 13 May 2009, 02:21

There are several ways to handle it, here are three I thought of. You can:

1. Change the amount of scrollback available in your terminal. I just checked and the default E17 terminal, gnome-terminal uses 500 lines. I use mrxvt and I have it set at 1000. How you change it depends on which terminal you use.

2. pipe the output of ffmpeg -h to a pager like less

Code: Select all
ffmpeg -h | less
(you exit out of that with q

3. redirect the output of ffmpeg -h to a file:

Code: Select all
 ffmpeg -h > ffmpeg_help.txt


Ron Rogers Jr. (CronoCloud)
CECHE01 PS3 (MGS4 80GB Bundle) without OtherOS and with an upgraded 320GB HD
Running Fedora 23 on a Compaq Presario CQ5320F upgraded with a Phenom X4 and GT640
Vizio E221A1 22" 1080P TV with HDMI, using 1080P over HDMI
PSN ID: CronoCloudAuron
User avatar
CronoCloud
Moderator
Moderator
 
Posts: 523
Joined: 21 Oct 2006, 05:48
Location: Central Illinois, USA

Re: terminal list won't fit on one page

Postby ppietro » 13 May 2009, 03:43

Heh heh - I love Unix.

CronoCloud listed a good command with:

ffmpeg -h | less

however - it won't show you *all* of the output. That's because some of the output of ffmpeg -h doesn't go to standard out.

So - invoking the high power of the unix shell - try this:

ffmpeg -h 2>&1 | less

See the extra info at the top? Neat, huh? :D

Cheers
Paul

P.S. Don't forget - it's a lower case "q" to exit less. :D
User avatar
ppietro
Site Admin
Site Admin
 
Posts: 4965
Joined: 13 Sep 2007, 22:18

Re: terminal list won't fit on one page

Postby bonedome » 13 May 2009, 13:09

Gawd knows where you guys find all this stuff, but i'm glad you do. :D
I borrowed my mate's "linux for dummies" book but the only use listed for less was more as a file reader.
gnome-terminal uses 500 lines. I use mrxvt and I have it set at 1000. How you change it depends on which terminal you use
I use xterm or gnome terminal (when I need to cut, copy and paste) any idea which file to edit for more lines ?
Although I may save ffmpeg help as a file for easy reference seeing as there's so much to it.
Thanx again
60Gb ps3 otheros awol. currently playing:bad company and farcry 2 again (seeing how far I can get using permadeath principle)update: regretfully Warren Clyde was involved in a shootout south of Pala and killed when he was hit by a land rover. RIP Warren
User avatar
bonedome
ydl guru
ydl guru
 
Posts: 755
Joined: 07 Aug 2008, 16:03
Location: uk

Re: terminal list won't fit on one page

Postby CronoCloud » 13 May 2009, 15:48

bonedome wrote:I borrowed my mate's "linux for dummies" book but the only use listed for less was more as a file reader.


The older "Linux for Dummies" book I have mentions pipes only briefly. Usually the BIG Linux books, like O'Reilly's "Running Linux" cover the terminal a bit more.

I use xterm or gnome terminal (when I need to cut, copy and paste) any idea which file to edit for more lines ?


Yes, xterm's settings are set in .Xdefaults and it's scrollback is set to whatever amount in this line:

Code: Select all
xterm*saveLines: 1000


Gnome-terminal puts it's settings in .gconf/apps/gnome-terminal...I think. But it looks like they're frakkin XML rather than plain text. It would probably easier to change the amount using gnome-terminal's preferences dialog.

Ron Rogers Jr. (CronoCloud)
CECHE01 PS3 (MGS4 80GB Bundle) without OtherOS and with an upgraded 320GB HD
Running Fedora 23 on a Compaq Presario CQ5320F upgraded with a Phenom X4 and GT640
Vizio E221A1 22" 1080P TV with HDMI, using 1080P over HDMI
PSN ID: CronoCloudAuron
User avatar
CronoCloud
Moderator
Moderator
 
Posts: 523
Joined: 21 Oct 2006, 05:48
Location: Central Illinois, USA

Re: terminal list won't fit on one page

Postby aguilarojo » 13 May 2009, 23:30

bonedome wrote:Hello
ok here's the problem when I type
Code: Select all
ffmpeg -h
in a terminal there are so many options that when you scroll to the top of the page the top half of ffmpeg help is missing and the same goes for any long list, does anyone know a command that will show the list in full or top and bottom half seperately ?


I'm not familiar with the above command, however most commands executed within a terminal can be immediately output to a file for later review. This method allows you to avoid manipulating/modifying how many lines your terminal sees or utilizes because in the world of programming and systems administration the detail you may need to know may be stripped out.

Let's consider something more in my world, I want to track down a process and see what's going on. The command's normal output is similar to the command you used in the sense that the result's scroll off-screen. How to collect all of the output? Simple. See here:

Code: Select all
$ps aux > findps
$vim findps


Explanation:
The output of ps is sent to the file findps. The editor vim is used to open findps. Stretch out the width of the terminal to see the full output of each line clearly.

Unix is wonderful indeed, isn't it? :D

All the best...
Last edited by aguilarojo on 17 May 2009, 15:34, edited 1 time in total.
User avatar
aguilarojo
ydl guru
ydl guru
 
Posts: 227
Joined: 06 May 2009, 14:50
Location: New York City

Re: terminal list won't fit on one page

Postby ppietro » 14 May 2009, 07:12

ppietro wrote:however - it won't show you *all* of the output. That's because some of the output of ffmpeg -h doesn't go to standard out.


Oh yeah - if you want to output the complete ffmpeg -h to a file, the command syntax is even funkier:

ffmpeg -h 2>&1 | tee outputfile.txt

Did I mention how much I love Unix? :lol:

Cheers,
Paul
User avatar
ppietro
Site Admin
Site Admin
 
Posts: 4965
Joined: 13 Sep 2007, 22:18


Return to General

Who is online

Users browsing this forum: No registered users and 41 guests