We use cookies on our websites to deliver our online services. Details about how we use cookies and how you may disable them are set out in our Privacy Statement. By using this website you agree to our use of cookies. Having some experience with Linux, you probably know that you can't just share a command or a utility between systems. The reason that you can't simply copy an executable from one system to another is because of dependencies, such as libraries and other supporting packages.
Some utilities certainly can be copied but this isn't universally so. If you've forgotten which package you installed that included the nslookup command, for example, you need a way to find it. Furthermore, once you find the package that a command belongs to, you might want to find out from which repository you installed the package.
The basic repositories of AppStream , BaseOS , and Extras contain a lot, but certainly not all of the packages you might need or encounter. In this article, I explore some methods of querying the system to find related repositories, packages, and commands. Is the utility you're using a script, plain text, or a command?
Is it compiled? What is the file's location? You might want some basic information about the utility. The which command locates a file if it's in your path. You will need to locate a file before you can further identify it. The first attempt failed because the file command doesn't know the location of the mtr command. After the full path is given to file , the information is displayed. As you can see, the file command is an important one to know and one which you're sure to use throughout your career.
The nslookup command is one that you use frequently but it isn't installed on any of the systems at your new job. You want to install it but you can't remember which package contains it and attempting to install it as nslookup fails. These files provide an easy way for software to be distributed, installed, upgraded, and removed since they're "packaged" in one place. Completely unrelated to what Linux uses them for, RPM files are also used as plug-in files by the RealPlayer software to add additional features to the program.
The RPM acronym stands for remote print manager , too, but also might have nothing at all to do with computer files, like when referring to the frequency rotation measurement revolutions per minute. It's important to realize that RPM files can't be used on Windows computers like they can on Linux systems. Use this command , where "file. In the previous command, "-i" means to install the file, so you can replace it with "-U" to perform an upgrade. The command below will install the RPM file and remove any previous versions of the same package:.
See our guide on using the rpm command for more information, or visit RPM. If your file is a RealPlayer Plug-in file, the RealPlayer program should be able to use it, but you probably can't open the file from within the program itself. In other words, if RealPlayer needs to use this file, it will most likely grab it from its installation folder since there isn't menu item in the program that can import them.
The following commands will install Alien and then use it to convert the file:. You can replace "-d" with "-i" to convert the package and then immediately start the install. To convert RPM to MP3 , MP4 , or some other non-archive format like that, your best bet is to first extract the files from the archive. You can do that with a decompression program like we mentioned above. Then, once you've taken the MP3 or whatever file out of the RPM file, use a free file converter on those files.
By the rpm command in query mode the option -f tells you what you're looking for. For example Code:. Find More Posts by dgar.
Thread Tools. BB code is On. Smilies are On. All times are GMT The time now is AM. Twitter: linuxquestions. Open Source Consulting Domain Registration. Search Blogs. Mark Forums Read. Find centralized, trusted content and collaborate around the technologies you use most. Connect and share knowledge within a single location that is structured and easy to search. How do I find out which package installs a specific file? I'm looking for where I have not necessarily already locally downloaded the package which may include the file that I'm looking for.
Use yum whatprovides , with the absolute path to the file you want which may be wildcarded. For example:. You may prefer the output and speed of the repoquery tool, available in the yum-utils package. Since this search will generally be performed only for files from installed packages, yum whatprovides is made blisteringly fast by disabling all external repos the implicit "installed" repo can't be disabled.
Well finding the package when you are connected to internet repository is easy however when you only have access to RPM packages inside Redhat or Centos DVD this happens frequently to me when I have to recover a server and I need an application I recommend using the commands below which is completely independent of internet and repositories. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow.
Learn more. How do I find which rpm package supplies a file I'm looking for? Ask Question.
0コメント