When I run which grep on Ubuntu Focal, I get /usr/bin/grep. However, apt-file search /usr/bin/grep does not show a package which delivers it. Moreover, dpkg-query -L grep only shows /bin/grep (among other related executables). So, what package delivers /usr/bin/grep?
Asked
Active
Viewed 1,294 times
3
Paul Grinberg
- 135
- 8
1 Answers
5
The package grep.deb installs the grep binary in /bin. In recent times, the /bin and /usr/bin have been unified in Ubuntu and many other linux distributions by symlinking /bin to /usr/bin. Thus, any binaries installed in either directories end up in /usr/bin.
/usr/bin is the directory that is included in the search PATH. Therefore, which grep identifies the file as /usr/bin/grep.
vanadium
- 97,564