From owner-freebsd-questions@FreeBSD.ORG Sun Nov 24 11:02:39 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4EA19FA7 for ; Sun, 24 Nov 2013 11:02:39 +0000 (UTC) Received: from mail-lb0-x233.google.com (mail-lb0-x233.google.com [IPv6:2a00:1450:4010:c04::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D1BCA2BDE for ; Sun, 24 Nov 2013 11:02:38 +0000 (UTC) Received: by mail-lb0-f179.google.com with SMTP id l4so2362215lbv.10 for ; Sun, 24 Nov 2013 03:02:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=f6/1ZqcjtVqFnES2DchJ+0sWxTlLMN3UBBrnCzVMv1Q=; b=fHwEJHZYO4B+M6N3sCtXPu6Eir+ZluRbkP+DQL053PotPMbcas44mqJ0vy8PcN50sT yztjt3WgO14O060NIf8ELc9vjGZWqrp5izuHwokSgVyGp4KdnbUgHoD+zKQBWphWYLHU zAHHBm80G/6OHZpLOdI+2V4I21sQkmLOEZc3979UibnyUCTSk2VF9didX+qnuSSezTsD EW2mHuNmUf0J+fCS7+5QF+dy02a0Rb5QjeBiS3lFkNRlAh5JmMRl6a/e+RPgBosEzLyN 1V4HiO5ivMp/hlP4Pc0+CtXsrfSQ2DkG28jmNEG+rHEEh3UuJ53phr8bhb68dXxwwCIr Tj/w== MIME-Version: 1.0 X-Received: by 10.152.10.99 with SMTP id h3mr17973463lab.13.1385290956832; Sun, 24 Nov 2013 03:02:36 -0800 (PST) Received: by 10.112.75.227 with HTTP; Sun, 24 Nov 2013 03:02:36 -0800 (PST) In-Reply-To: <20131124110430.5fe46515.freebsd@edvax.de> References: <20131124110430.5fe46515.freebsd@edvax.de> Date: Sun, 24 Nov 2013 14:32:36 +0330 Message-ID: Subject: Re: how "more" and "less" work together? From: s m To: Polytropon Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.16 Cc: freebsd-questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2013 11:02:39 -0000 oh yes, it work!!! thank you so much. i forgot to link more and less :| thank you very much for your quick help On Sun, Nov 24, 2013 at 1:34 PM, Polytropon wrote: > 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, > hardlinked. > > % 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. :-) > > > > -- > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... >