You are not logged in.
when reading about linux-commands, you are sure to come across the saying 'less is more', which is meant to mean that the program 'less' is better than the program 'more' (ok, preferential, but it IS said)
the easiest way to encounter 'less' is by viewing man pages (in #! at least). but when you use the 'q' command to quit 'less', the screen is cleared of the man page text as if nothing ever happened. 'more' does not have this behavior, so i did:
PAGER="more"however, i soon found out the reason why 'less is more': 'more' does not allow you to scroll up and down through the file as easy as 'less' does. so, i figured, maybe 'less' has an option to not clear the screen after exiting. and as it turns out, it does! so, i did:
PAGER="less -X"maybe this little tip is of use to someone!
Last edited by rhowaldt (2011-09-14 18:53:17)
Offline
Hence the name less. There was more, but it wasn't enough. Unix devs love playing with words.
For manpages, I recommend most. Install it and export it as the pager. You'll be amazed.
I'm so meta, even this acronym
Offline
Hence the name less. There was more, but it wasn't enough. Unix devs love playing with words.
For manpages, I recommend most. Install it and export it as the pager. You'll be amazed.
What is a "pager"
How do you "export it a the pager?"
how does one use "more" or "less" or "most" to read a man page?
I use a bash script: manp
#!/bin/bash
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#See <http://www.gnu.org/licenses/>.
# USAGE:
# manp foobar
# check to see if running from a terminal
[ -t 0 ] && [ -t 1 ] || { zenity --warning --text="${0}: this script must be run from a terminal." ; exit 1 ;}
# cd to man page directory
cd /media/5/Documents/manPages
# gets "topic" (ie: foobar) from commandline
topic="$1"
# if "topic.txt" exists read it with gedit
if [ -e ${topic}.txt ] ; then
gedit ${topic}.txt &
else
# if topic.txt does not exist - create it
man --pager=cat --encoding=utf8 $topic >${topic}.txt
# check to see if "foobar.txt is > 0 bytes and if true reads it
# with gedit
if [ -s ${topic}.txt ] ; then
gedit ${topic}.txt &
# if topic.txt is 0 bytes - delete the created file.
else
rm ${topic}.txt
fi
fi
exitLast edited by Sector11 (2011-09-14 19:39:34)
#! Etiquette | Conky PitStop | VSIDO | Interactive LUA
Weather v9000 | Teo x4 Sites | Arclance | Finnish
Offline
if one says "export", he's talking about a variable.
export PAGER='most'Type it in bash and try a manpage. You can also put that line in your .bashrc to have it always.
I'm so meta, even this acronym
Offline
@sector11
"man" is the standard program to read man-pages. and as "man man" (the manual page for man) states it uses PAGER to determine which program to use in order to display the page (default is normally less)
And a pager is a program which will display text files or the like in a scrollable way (like pages). try "more some/text/file" or "less some/text/file"
Offline
Hence the name less. There was more, but it wasn't enough. Unix devs love playing with words.
For manpages, I recommend most. Install it and export it as the pager. You'll be amazed.
Thanks, I had no idea this gem even existed.
Offline
if one says "export", he's talking about a variable.
export PAGER='most'Type it in bash and try a manpage. You can also put that line in your .bashrc to have it always.
OK I have the lines in my bashrc:
# use most
export PAGER='most'Now what?
18:41:03 ~
$ most df
df: No such file or directory
18:41:08 ~
$ Never mind - I'm such a noob!!
Now that I can get used to! Much better than "manp" and clears HDD space.
#! Etiquette | Conky PitStop | VSIDO | Interactive LUA
Weather v9000 | Teo x4 Sites | Arclance | Finnish
Offline
Hi luc .. good to see ya.
I know about "man" ... been using it forever, but didn't like the terminal output
@sector11
"man" is the standard program to read man-pages. and as "man man" (the manual page for man) states it uses PAGER to determine which program to use in order to display the page (default is normally less)
And a pager is a program which will display text files or the like in a scrollable way (like pages). try "more some/text/file" or "less some/text/file"
gotta be careful of which file:
18:49:51 ~
$ file:///home/sector11/Odds_&_Ends.txt
[1] 4763
bash: _Ends.txt: command not found
bash: file:///home/sector11/Odds_: No such file or directory
[1]+ Exit 127 file:///home/sector11/Odds_
18:49:53 ~
$ more ~/Odds_&_Ends.txt
[1] 5083
bash: _Ends.txt: command not found
[1]+ Stopped more ~/Odds_
18:51:33 ~
$ more ~/pstree.txt
12:30:44 ~
$ pstree
init─┬─atd
├─avahi-daemon───avahi-daemon
├─5*[conky]
├─conky───sh───python2.6
├─conky───2*[{conky}]
├─console-kit-dae───63*[{console-kit-da}]
├─cron
├─cupsd
├─2*[dbus-daemon]OK, it's official - I like MOST!!!!!
say goodbye to "manp"
Last edited by Sector11 (2011-09-14 22:07:12)
#! Etiquette | Conky PitStop | VSIDO | Interactive LUA
Weather v9000 | Teo x4 Sites | Arclance | Finnish
Offline
@ Awebb --
THANK YOU! Nice stuff
#! Etiquette | Conky PitStop | VSIDO | Interactive LUA
Weather v9000 | Teo x4 Sites | Arclance | Finnish
Offline
Hence the name less. There was more, but it wasn't enough. Unix devs love playing with words.
For manpages, I recommend most. Install it and export it as the pager. You'll be amazed.
If less is more, then that would make more less, but if more is less and less is more, wouldn't that make more more?
"Of course it's happening inside your head, Harry, but why on earth should that mean that it is not real?" -Albus Dumbledore
Offline
@s11
be careful to escape the ampersand in filenames. ampersand is a special character in the shell, if you put it after a command that command will be executed in the background. you might have seen it in the autostart.sh file.
execute:
sleep 10
sleep 10 &
jobsLast edited by luc (2011-09-14 22:20:24)
Offline
Did not know thanx
... and a kind word. -Duke
Offline
@s11
be careful to escape the ampersand in filenames. ampersand is a special character in the shell, if you put it after a command that command will be executed in the background. you might have seen it in the autostart.sh file.
execute:sleep 10 sleep 10 & jobs
And that is probably why the demons in nethack look like ampersands.
Last edited by AwesomeFist (2011-09-15 03:23:57)
"Of course it's happening inside your head, Harry, but why on earth should that mean that it is not real?" -Albus Dumbledore
Offline
@ Awebb --
THANK YOU! Nice stuff
I'd like to thank the Academy.
If less is more, then that would make more less, but if more is less and less is more, wouldn't that make more more?
It is. I calculate boolean by multiplying with 0 and incrementing once. I love to see the truth.
I'm so meta, even this acronym
Offline
if one says "export", he's talking about a variable.
export PAGER='most'Type it in bash and try a manpage. You can also put that line in your .bashrc to have it always.
...or you can
update-alternatives --config pagerchoose 'most' from the list, and be done with it. 
while ( ! ( succeed = try() ) );
We've earned a reputation as a nice, friendly community; please help us keep it that way.
Offline
@s11
be careful to escape the ampersand in filenames. ampersand is a special character in the shell, if you put it after a command that command will be executed in the background. you might have seen it in the autostart.sh file.
execute:sleep 10 sleep 10 & jobs
Yea, I should have known that because I'm always using:
killall conky && conky -c ~/conky/someconky &for testing purposes ... it was just a bad choice of a file to test with 
#! Etiquette | Conky PitStop | VSIDO | Interactive LUA
Weather v9000 | Teo x4 Sites | Arclance | Finnish
Offline
Awebb wrote:if one says "export", he's talking about a variable.
export PAGER='most'Type it in bash and try a manpage. You can also put that line in your .bashrc to have it always.
...or you can
update-alternatives --config pagerchoose 'most' from the list, and be done with it.
My preferred method, too. Do it the easy way first, if that doesn't work then rtfm.

Offline
hey cool, did not know about 'most'. does it do the scrolling stuff like 'less', and does it also not clear the screen, like 'most'? because that is all i wanted in the first place.
Offline
Awebb wrote:if one says "export", he's talking about a variable.
export PAGER='most'Type it in bash and try a manpage. You can also put that line in your .bashrc to have it always.
...or you can
update-alternatives --config pagerchoose 'most' from the list, and be done with it.
Interesting that lets me see it, but needed a sudo to do it.
#! Etiquette | Conky PitStop | VSIDO | Interactive LUA
Weather v9000 | Teo x4 Sites | Arclance | Finnish
Offline
Omg I have colorized man pages now that I can scroll one line at a time. *mind blown*
Offline
@rhowaldt: As far as I can tell, most is just a Turnerized more.
while ( ! ( succeed = try() ) );
We've earned a reputation as a nice, friendly community; please help us keep it that way.
Offline
Ah, that debian specific configuration is mostly strange to me. I prefer to have anything bash relevant in .bashrc, but if it works, it works :-D
I'm so meta, even this acronym
Offline
just tried out 'most'... clears the screen after pressing 'q', and does not even seem to have an option to stop doing that. so i'm wondering why this discussion has turned to 'most' like that, when my initial post is about acquiring functionality that 'most' does not provide... seems like a colorized version of 'less', with less options. unless i am overlooking something, i don't think the name 'most' is justified.
Offline
Also just switched to most, but would appreciate some pointers as to where the awesomeness lies as compared to less.
John
--------------------
( a boring Japan blog , and idle twitterings )
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.