File command Linux package name
8,167
If you had file
installed on one of your systems, than the following command would have answered your question
rpm -q --whatprovides `which file`
In CentOS and other RedHat derived distributions the name of the package is file
$ rpm -q --whatprovides `which file`
file-5.04-13.el6.x86_64
Edit 2 (after a comment from jww)
To install file
type
sudo yum install file
Edit 1 As @Miquel reminds in Debian and Ubuntu one can use dpkg-query -S
:
$ dpkg-query -S `which file`
file: /usr/bin/file
Related videos on Youtube
Author by
Kalle Richter
Updated on September 18, 2022Comments
-
Kalle Richter over 1 year
I can't find out which package provides the
file
on CentOS 6.-
jww almost 8 yearsTry
sudo yum install file
.
-
-
Miquel almost 12 yearsReplace
rpm -q
withdpkg -S
in debian/ubuntu/derivates -
jww almost 8 yearsThe
file
progam is missing on CentOS 6 and 7:/usr/bin/which: no file in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
I don't believe we can usewhich
to locate it. Andrpm -q --whatprovides "/usr/bin/file"
results inerror: file /usr/bin/file: No such file or directory
. -
humble almost 8 years@jww edited the post