Re: iso: info on determining in what packages a command might be found?
Thomas Corriher <[email protected]> Tue, 5 Aug 2003 00:51:05 -0400
| Newsgroups | gmane.linux.redhat.migration |
|---|---|
| Message-ID | <20030805045114.CSTX12990.imf22aec.mail.bellsouth.net@there> |
> One of the shell commands that make up a part of this application > invokes the command 'compress' on solaris. I know there are > comperable commands like gzip or bzip2 - but since the > application is going to continue to run on both platforms, I need > to invoke compress on linux. > > To do that, I need to _find_ compress. which compress or type comp ress or locate compress > What resources are available to 'look up' to see what red hat > package contains compress - or any other command, for that > matter? rpm -q --whatprovides $(which compress) old style for same command below rpm -q --whatprovides `which compress` Normally, you'd first get the full path with "which compress"; which would yield /usr/bin/compress. Then you would put that into the RPM command like this: "rpm -q --whatprovides /usr/bin/compress". The above is a one-liner technique ready for using in shell scripts, but you would need to change "compress" to the $1 parameter. May the source be with you. ;) -- Thomas Corriher