how "more" and "less" work together?
freebsd at edvax.de
Sun Nov 24 10:04:52 UTC 2013
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
> 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
As briefly explained. :-)
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions