Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Just when I was getting curious about less vs. more

I am running Snow Leopard. When I type more it says

Missing filename ("less --help" for help)

So I type whereis more and it says /usr/bin/more. Okay, so I run that and it says the same thing. Even man more says

NAME
       less - opposite of more

Was more killed as part of my Snow Leopard install, or was it something else that I installed that did this?

share|improve this question

4 Answers 4

up vote 4 down vote accepted

I don't know whether Leopard had it when I was running it. I just don't use more; less is just so much more powerful. Both man more and man less open the same manpage, which is that of less. If you look at the sizes of the files /usr/bin/more and /usr/bin/less, they are identical. The two binaries are identical as well.

share|improve this answer
    
cool, at least it's not me –  Yar Feb 2 '10 at 15:17
3  
yes, they are identical (there's a hardlink from less to more) stat output that shows this: stat more -> inode 11892499 stat less -> inode 11892499 Much like vi and view. –  skarface Feb 2 '10 at 16:47
    
Thanks @skarface, I had no idea that two filenames could point to the same resource. That's different than a symbolic link, I suppose. –  Yar Feb 2 '10 at 23:42
    
@Yar: Also try ls -li {/usr,}/bin/{less,more}. The -i will show the inodes and the brace expansion will show the various locations (including errors if they don't exist in those locations). type -a less more will show locations, aliases and function definitions (but not inodes or whether symlinks exist). –  Dennis Williamson Oct 3 '10 at 17:42

For quite some time a lot of linux distributions have aliased or symlinked more to less, I assume OSX has done the same thing.

Chances are that you never had the original more installed.

share|improve this answer
    
didn't know that... thanks! –  Yar Feb 2 '10 at 15:17
1  
@Yar: By contrast, more on my system is its own binary. While it's much more capable than the original more, it still falls far short of less. The version of more I have doesn't report a version number, but it's part of the util-linux-ng on Ubuntu 9.10. Another pager that you might like to take a look at is most. –  Dennis Williamson Oct 3 '10 at 17:58
    
Thanks @Dennis Williamson, I will check out most as well. –  Yar Oct 3 '10 at 20:47

Unfortunately, my level is too low to comment on one of the other answers... so here's an out-of-line comment: On Leopard, both more and less can be found in /usr/bin, with the same file size, date, and length. Interestingly neither is a link to the other:

-rwxr-xr-x 2 root wheel 254288 May 31 2008 /usr/bin/less

-rwxr-xr-x 2 root wheel 254288 May 31 2008 /usr/bin/more

So I guess Snow Leopard is indeed different, I didn't add these.

share|improve this answer
2  
They are linked, just with a hardlink, not a symbolic link, which is why you don't see the -> in ls. Take a look at my comment above, stat shows that they are both on the same inode. –  skarface Feb 2 '10 at 16:48
    
Is it possible to make our own hardlinks? –  macek Feb 5 '10 at 22:16
    
@macek: Yes, just use ln. Nicely explained here: en.wikipedia.org/wiki/Hard_link –  sleske Oct 2 '10 at 21:46

As noted more & less are actually the same binary, but it behaves differently depending on which name was used to run it, so you get the benefits of both.

share|improve this answer
    
example? I thought that it performs the same –  Yar Feb 6 '10 at 8:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.