Find duplicate executables files

Sometime duplicate executable files or alias creates tons of confusion. To find out duplicated executables files you can use chkdupexe command.

ADVERTISEMENTS

It will scan the union of $PATH and a hardcoded list of common locations for binaries. It will report dangling symlinks and duplicately-named binaries.

Examples

$ chkdupexe

Output:

Dangling symlink: /usr/bin/rmic
Dangling symlink: /usr/bin/jar
-rwxr-xr-x 1 root root  38936 Sep 23  2004 /usr/bin/nsupdate
-rwxr-xr-x 1 root root 203960 Jan 26  2005 /usr/sbin/nsupdate
-rwxr-xr-x 1 root root  15139 Apr  6 01:48 /sbin/grub-install
-rwxr-xr-x 1 root root   6453 Apr  1 18:38 /usr/sbin/grub-install

As you see, it is quite easy to identify all those duplicates executables files. There is also some good discussion going on about PATH and aliases.

See also:

Updated for accuracy.

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source & DevOps topics via:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
3 comments… add one
  • stereonerd May 17, 2006 @ 16:12

    Excuse me, does ‘hkdupexe’ command exist in GNU/Linux? I doesn’t seem to find it.

    Thanks

  • stereonerd May 17, 2006 @ 16:14

    oh, sorry for my poor english, I mean: I don’t seem to find it.

    Regards

  • 🐧 Vivek Gite May 17, 2006 @ 18:07

    Command name is chkdupexe and not hkdupexe. It was typo 🙁

    Sorry, and post is updated for accuracy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.