LinuxQuestions.org
Register a domain and help support LQ
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 10-15-2003, 10:17 PM   #1
podollb
Member
 
Registered: Oct 2003
Location: Grand Forks, ND
Distribution: Suse/Slackware/RH
Posts: 161

Rep: Reputation: 30
Question Less vs More


What is better the less program or the more program and why?
 
Old 10-15-2003, 10:40 PM   #2
Greyweather
Member
 
Registered: Aug 2003
Distribution: Ubuntu 4.10
Posts: 311

Rep: Reputation: 30
I prefer less as it has more functions (i.e. backwards scrolling) as compared with more.
 
Old 10-15-2003, 10:59 PM   #3
jediknight
LQ Newbie
 
Registered: Sep 2003
Location: Spokane, WA
Distribution: Mandrake 9.1
Posts: 2

Rep: Reputation: 0
Less is very much a clone of more, with a few subtle differences. 'less' will allow you to scroll backwards through a file, in case you overshoot. Also, according to the 'man' page on less,

"Also, less does not have to read the entire input file before starting, so with large input files it starts up faster than text editors like vi."

I'd have to go with 'less', even though the differences are subtle.
 
Old 10-15-2003, 11:04 PM   #4
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
I like to pipe output of such commands as "ps aux" through less, so that I can scroll back and forth through ALL the output, while I try to figure things out. I also use less instead of cat so that I can scroll around to my heart's content. That's why I prefer less to more, and also to cat. I would feel more lost than I already do, without less...

Last edited by jonr; 10-16-2003 at 12:38 AM.
 
Old 10-16-2003, 12:23 AM   #5
speter
Member
 
Registered: Sep 2003
Location: Edison, NJ
Distribution: Fedora, Mac OS X
Posts: 313

Rep: Reputation: 30
Well as they say, less is more, only more of it, more or less. Seriously, though, less wins, just because of the scrolling.

Steve
 
Old 10-16-2003, 03:50 AM   #6
Shade
Senior Member
 
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Blog Entries: 1

Rep: Reputation: 46
It's a common misconception that you can't scroll backwards with more.

You can.

Just hit the b key and it'll take it back one screen.

-Shade
:-D
 
Old 10-16-2003, 04:55 AM   #7
wuck
Member
 
Registered: Sep 2003
Location: barneveld.nl
Distribution: Slackware
Posts: 170

Rep: Reputation: 30
I like less the best, I use it most often.
 
Old 10-16-2003, 06:48 AM   #8
UltimaGuy
Member
 
Registered: Aug 2003
Location: Chennai, India
Distribution: PCLinuxOS .92, FC4
Posts: 840

Rep: Reputation: 31
The advantage less offers is that it is more newbie friendly, and also it has the option of moving back one line at a time. So, I use less more than more.
 
Old 10-16-2003, 09:32 AM   #9
yapp
Member
 
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
less has another cool feature, try "less some.tar.gz", or "less program.rpm". It works!

If you want to know how this works: inspect the LESSPIPE variable.
 
Old 10-16-2003, 10:27 AM   #10
kwiksand
Member
 
Registered: Jun 2003
Location: Perth, AUS
Distribution: Gentoo
Posts: 35

Rep: Reputation: 15
Quote:
Originally posted by UltimaGuy
So, I use less more than more.
That is gold!

In any other topic of conversation, that would have me wondering for hours, however it makes perfect sense in this respect.
 
Old 10-16-2003, 09:12 PM   #11
camelrider
Member
 
Registered: Apr 2003
Location: Juneau, Alaska
Posts: 247

Rep: Reputation: 31
Cool

Once, long ago, I accidentally hit the "v" key while viewing a file in less. It opened the file in vim! Then when you exit vim, you're back in the less view of the edited file.
 
Old 10-16-2003, 10:40 PM   #12
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
Quote:
Originally posted by camelrider
Once, long ago, I accidentally hit the "v" key while viewing a file in less. It opened the file in vim! Then when you exit vim, you're back in the less view of the edited file.
Thanks for the warning! The times I've ended up in vim, either by accident or out of an insane desire to experiment, I've ended up cancelling my X session and starting a new one to get out of it. I know I'm a wimp and everybody's supposed to learn how to use vim, but I never learned to swim, either.
 
Old 10-16-2003, 11:10 PM   #13
misophist
Member
 
Registered: Aug 2003
Location: here
Distribution: suse 8.2
Posts: 169

Rep: Reputation: 30
Vim is easy. If you want to suffer, try vi or emacs.
 
Old 10-16-2003, 11:14 PM   #14
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
Quote:
Originally posted by misophist
Vim is easy. If you want to suffer, try vi or emacs.
Tried both! Suffered plenty! Guess I'm just an oddball who prefers to enjoy time spent at the computer...
 
Old 10-16-2003, 11:26 PM   #15
speter
Member
 
Registered: Sep 2003
Location: Edison, NJ
Distribution: Fedora, Mac OS X
Posts: 313

Rep: Reputation: 30
I'm sorry, you've got the wrong holy war. This is more vs. less. Vi vs. emacs is down the hall.

Steve
 
  


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




All times are GMT -5. The time now is 09:38 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration