[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: duplicate binaries



dan wrote:
> On Fri, Feb 05, 1999 at 08:19:19PM -0500, Mitch Blevins wrote:
> > In foo.debian-user, you wrote:
> > > I was looking around in the /bin directory, and there are several duplicate files installed there.  For example, grep, fgrep, and egrep are all the same file.  The program checks to see how it was called to determine what to do.
> > > 
> > > Shouldn't files like egrep and fgrep be symbolic links to grep, and same for any other program like this?
> > > 
> > > Should bug reports be filed for these?
> > > 
> > > Please CC to me, as I'm not on the list.
> > 
> > I only have egrep and fgrep in the /bin directory.
> > Could you please send the output of
> > 'dpkg -S /usr/bin/egrep'
> > and
> > 'dpkg -S /usr/bin/fgrep'
> > so that we can identify the offending package.
> > 
> > (and any other duplicate binaries you find)
> > 
> > -Mitch
> 
> Here's the output that confuses me:
> 
> $ dpkg -S grep | grep bin
> gzip: /usr/bin/zgrep
> grep: /bin/egrep
> grep: /bin/grep
> grep: /bin/fgrep
> gzip: /usr/bin/zegrep
> unzip-crypt: /usr/bin/zipgrep
> gzip: /usr/bin/zfgrep
> rgrep: /usr/bin/rgrep
> 
> With the output of the ls commands here, note the sizes of the files.  I have
> actually checked, and the files are identical except for their names.
> 
> $ ls -l /bin/*grep /usr/bin/*grep
> -rwxr-xr-x   3 root     root        75728 Apr 27  1998 /bin/egrep
> -rwxr-xr-x   3 root     root        75728 Apr 27  1998 /bin/fgrep
> -rwxr-xr-x   3 root     root        75728 Apr 27  1998 /bin/grep
> -rwxr-xr-x   1 root     root        12992 Jan  3 10:23 /usr/bin/rgrep
> -rwxr-xr-x   3 root     root         1375 Jan 27 21:51 /usr/bin/zegrep
> -rwxr-xr-x   3 root     root         1375 Jan 27 21:51 /usr/bin/zfgrep
> -rwxr-xr-x   3 root     root         1375 Jan 27 21:51 /usr/bin/zgrep
> 
> The first three, egrep, fgrep, and grep are all identical files.  The same is
> true for zegrep, zfgrep and zgrep.
> 
> This is seen again with gzip, gunzip, uncompress, and zcat.  
> $ cd /bin; ls -l gzip gunzip uncompress zcat
> -rwxr-xr-x   4 root     root        44972 Jan 27 21:51 gunzip
> -rwxr-xr-x   4 root     root        44972 Jan 27 21:51 gzip
> -rwxr-xr-x   4 root     root        44972 Jan 27 21:51 uncompress
> -rwxr-xr-x   4 root     root        44972 Jan 27 21:51 zcat
> 
> Here is another instance:
> $ cd /usr/bin; ls -l perl perl5.00404 suidperl sperl5.00404 
> -rwxr-xr-x   2 root     root       491820 Feb  3 02:58 perl
> -rwxr-xr-x   2 root     root       491820 Feb  3 02:58 perl5.00404
> -rwsr-xr-x   2 root     root       493132 Feb  3 02:58 sperl5.00404
> -rwsr-xr-x   2 root     root       493132 Feb  3 02:58 suidperl
> 
> The files are identical except for their names.  There are probably a bunch
> of other packages that have this, too.  Shouldn't there be symlinks instead
> of having multiple copies of everything?

Okay, now I understand.
I thought you meant that you had both a /bin/grep and a /usr/bin/grep.

It seems to me that these should be symlinks.  Maybe there's a valid
reason for having them distinct *shrugs*.
File a bug against the packages they are in and at least the issue
will be addressed.

-Mitch


Reply to: