public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: "Pádraig Brady" <P@draigBrady.com>
To: Karel Zak <kzak@redhat.com>
Cc: Sami Kerola <kerolasa@iki.fi>, util-linux@vger.kernel.org
Subject: Re: [PATCH 3/3] chkdupexe: reimplement command in C
Date: Mon, 02 Apr 2012 13:22:15 +0100	[thread overview]
Message-ID: <4F7999F7.7030808@draigBrady.com> (raw)
In-Reply-To: <20120402111029.GA1084@x2.net.home>

On 04/02/2012 12:10 PM, Karel Zak wrote:
> On Sun, Apr 01, 2012 at 08:19:32PM +0200, Sami Kerola wrote:
>> The new version of the command is nearly identical to old.  Major
>> differences are:
>>
>> * New output is a little rough what comes to alignment.  This is
>>   flagged as FIXME item in source.
>> * The command is much quicker than perl implementation which used
>>   to exec ls -ldU.
>> * Size of chkdupexe binary is about five times bigger than perl
>>   script.
> 
> I have doubts about chkdupexe, do we really need this command?
> 
>  * it provides very rarely used functionality (for example nobody
>    complains that the command is missing in Fedora/RHEL ;-)
> 
>  * it seems that you can replace it by
> 
>     ls $(echo "$PATH" | tr : ' ') | sort | uniq -d
> 
>    or we can extend which(1) or so...
> 
> 
>  I see two possible ways:
> 
>  1) mark chkdupexe as deprecated and remove it from distros

I notice it's no longer on my Fedora 15 distro at least.

>  2) or add new command (lspath ?) and get much more information from
>  $PATH (like duplicates, per-directory stats, per-owner stats,
>  per-device stats, selinux summary, suids, etc.) and make chkdupexe as
>  alias to the new command (just for backward compatibility).

Possible but unlikely

>  If 2) makes sense then it would be better to have it in coreutils ;-)

I'd vote for 1.
Note I actually wrote a very similar tool as part of fslint, called findsn.
It has different modes of operation, but the default is the same as chkdupexe.

$ ~/git/util-linux/misc-utils/chkdupexe.pl
Dangling symlink: /usr/bin/openoffice.org
-rwxr-xr-x. 1 root    root    86360 Feb  8  2011 /usr/bin/bc
-rwxrwxr-x. 1 padraig padraig  1767 Apr 11  2007 /home/padraig/bin/bc
-rwxr-xr-x. 1 root    root    50616 Aug 25  2011 /usr/bin/timeout
-rwxrwxr-x. 1 padraig padraig  2141 Oct 29  2009 /home/padraig/bin/timeout
-rwxr-xr-x. 1 root    root    51176 Feb  8  2011 /usr/bin/truncate
-rwxrwxr-x. 1 padraig padraig  1273 Dec 16  2005 /home/padraig/bin/truncate

$ fslint/findsn
-rwxr-xr-x. 1 root    root    86360 Feb  8  2011 /usr/bin/bc
-rwxrwxr-x. 1 padraig padraig  1767 Apr 11  2007 /home/padraig/bin/bc
lrwxrwxrwx. 1 root    root        2 May 13  2011 /bin/ex -> vi
lrwxrwxrwx. 1 root    root        3 May 22  2011 /usr/bin/ex -> vim
-rwxr-xr-x. 1 root    root    50616 Aug 25  2011 /usr/bin/timeout
-rwxrwxr-x. 1 padraig padraig  2141 Oct 29  2009 /home/padraig/bin/timeout
-rwxr-xr-x. 1 root    root    51176 Feb  8  2011 /usr/bin/truncate
-rwxrwxr-x. 1 padraig padraig  1273 Dec 16  2005 /home/padraig/bin/truncate

$ ./fslint/findbl $(fslint/supprt/getffp)
/usr/bin/openoffice.org -> /usr/lib64/libreoffice/program/libreoffice

cheers,
Pádraig.

      parent reply	other threads:[~2012-04-02 12:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-20 19:27 [pull] chkdupexe, a bug, version numbers and bashisms Sami Kerola
2012-03-30 15:04 ` Karel Zak
2012-04-01 18:19   ` Sami Kerola
2012-04-01 18:19     ` [PATCH 1/3] tests: hwclock: locate ntpdate by using path Sami Kerola
2012-04-02 11:22       ` Karel Zak
2012-04-01 18:19     ` [PATCH 2/3] script: error in usage() output Sami Kerola
2012-04-02 11:27       ` Karel Zak
2012-04-01 18:19     ` [PATCH 3/3] chkdupexe: reimplement command in C Sami Kerola
2012-04-02 11:10       ` Karel Zak
2012-04-02 11:53         ` Sami Kerola
2012-04-02 12:12           ` Karel Zak
2012-04-04 10:24           ` Karel Zak
2012-04-02 12:22         ` Pádraig Brady [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F7999F7.7030808@draigBrady.com \
    --to=p@draigbrady.com \
    --cc=kerolasa@iki.fi \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox