Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Nov 2013 11:04:30 +0100
From:      Polytropon <>
To:        s m <>
Cc:        freebsd-questions <>
Subject:   Re: how "more" and "less" work together?
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Sun, 24 Nov 2013 13:10:52 +0330, s m wrote:
> i have freebsd9.2 and want to customize "more" functionality but i can not
> find any code for it; therefore i change the "less" code.

Because "more is less", both executables are generated from
the same source code. In fact, those are the same binary,

% which more less | xargs ls -l
-r-xr-xr-x  2 root  wheel  118788 Aug 21  2011 /usr/bin/less
-r-xr-xr-x  2 root  wheel  118788 Aug 21  2011 /usr/bin/more

So there is no separate source code for "more". Similarly,
zless, bzless, xzless, and lzless are "created". They're
all the same shell script, refering to /usr/bin/less.

> now my question is how more and less work together??

They don't. :-)

> i compiled my code and
> if i run less (which i change it) manually, it works fine, but more command
> doesn't use it. i put my less daemon is /usr/bin.

Make sure the hardlinks are created correctly. You can do that
with the "make install" command in the system's source tree
after applying your patch. See /usr/src/usr.bin/less/Makefile
for details.

> any body knows how can i apply my changes to more command?

Change the source code directly in the proper /usr/src subdirectory
or create a patch with a work copy. Then install it.

> how can i update
> more daemon (which is located in /usr/bin) in order to use the new less
> daemon?

As briefly explained. :-)

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

Want to link to this message? Use this URL: <>