Score:3

Where does /usr/bin/grep come from in Ubuntu Focal

us flag

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?

cn flag
Ray
On my Ubuntu system, `/usr/bin/grep` and `/bin/grep` are the exact same file. Probably it gets copied over during the installation process?
Score:5
cn flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.