Fedora Linux Support Community & Resources Center
Old 13th September 2017, 12:31 AM
steevithak Offline
Registered User
Join Date: Jun 2010
Posts: 12
Does dnf support wildcards like yum did?

In olden times, I could use wildcards with yum, like so:

yum list gimp*

And I'd get a nice long list of all the packages that started with gimp. I've noticed that doesn't work with dnf. Is there some other syntax I need to use or do wildcards just not work anymore?

For example

dnf list gimp*
Error: No matching Packages to list

dnf list gim*
Error: No matching Packages to list

But I know the packages are there because:

dnf list gimp
Available Packages
gimp.x86_64 2:2.8.22-2.fc26 fedora

dnf list gimp-devel
Available Packages
gimp-devel.x86_64 2:2.8.22-2.fc26 fedora
Reply With Quote
Old 13th September 2017, 01:05 AM
marko's Avatar
marko Offline
Registered User
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 7,121
Re: Does dnf support wildcards like yum did?

Sure but the issue is that "dnf list gimp*" actually expands to any file in the current directory that "globs" to gimp*. Frequently the glob will not find a match (that is, no file in your directory started with "gimp"), in that case 'gimp*' collapses to "gimp" and then that is passed to "dnf list". In that case, "dnf list gimp" is run and you get back this:
Available Packages
gimp.x86_64 2:2.8.22-2.fc26 fedora
So try this:

dnf list gimp\*
or single tick
dnf list 'gimp*'
the backslash or single quotes forces the shell to escape the glob process and just runs 'dnf list gimp*"
which gets the result I really think you want:

gimp.x86_64                            2:2.8.22-2.fc26                   fedora 
gimp-data-extras.noarch                2.0.2-15.fc26                     fedora 
gimp-dbp.x86_64                        1.1.9-11.fc26                     fedora 
gimp-dds-plugin.x86_64                 3.0.1-6.fc26                      fedora 
gimp-devel.i686                        2:2.8.22-2.fc26                   fedora 
gimp-devel.x86_64                      2:2.8.22-2.fc26                   fedora 
gimp-devel-tools.x86_64                2:2.8.22-2.fc26                   fedora 
gimp-elsamuko.noarch                   26-3.fc26                         fedora 
gimp-focusblur-plugin.x86_64           3.2.6-2.fc26                      fedora 
gimp-fourier-plugin.x86_64             0.4.1-13.fc26                     fedora 
gimp-gap.x86_64                        2.7.0-15.GITe75bd46.fc26          fedora 
gimp-help.noarch                       2.8.2-6.fc26                      fedora 
gimp-help-ca.noarch                    2.8.2-6.fc26                      fedora 
gimp-help-da.noarch                    2.8.2-6.fc26                      fedora 
gimp-help-de.noarch                    2.8.2-6.fc26                      fedora 
gimp-help-el.noarch                    2.8.2-6.fc26                      fedora 
gimp-help-en_GB.noarch                 2.8.2-6.fc26                      fedora 
gimp-help-es.noarch                    2.8.2-6.fc26                      fedora 
gimp-help-fr.noarch                    2.8.2-6.fc26                      fedora 
gimp-help-it.noarch                    2.8.2-6.fc26                      fedora 
gimp-help-ja.noarch                    2.8.2-6.fc26                      fedora 
gimp-help-ko.noarch                    2.8.2-6.fc26                      fedora 
gimp-help-nl.noarch                    2.8.2-6.fc26                      fedora 
gimp-help-nn.noarch                    2.8.2-6.fc26                      fedora 
gimp-help-pt_BR.noarch                 2.8.2-6.fc26                      fedora 
gimp-help-ru.noarch                    2.8.2-6.fc26                      fedora 
gimp-help-sl.noarch                    2.8.2-6.fc26                      fedora 
gimp-help-sv.noarch                    2.8.2-6.fc26                      fedora 
gimp-help-zh_CN.noarch                 2.8.2-6.fc26                      fedora 
gimp-high-pass-filter.noarch           1.2-7.fc26                        fedora 
gimp-layer-via-copy-cut.x86_64         1.6-5.fc26                        fedora 
gimp-lensfun.x86_64                    0.2.4-4.fc26                      fedora 
gimp-libs.i686                         2:2.8.22-2.fc26                   fedora 
gimp-libs.x86_64                       2:2.8.22-2.fc26                   fedora 
gimp-lqr-plugin.x86_64                 0.7.2-7.fc26                      fedora 
gimp-luminosity-masks.noarch           0-3.fc26                          updates
gimp-normalmap.x86_64                  1.2.3-14.fc26                     fedora 
gimp-paint-studio.noarch               2.0-12.fc26                       fedora 
gimp-resynthesizer.x86_64              2.0-6.20160601git787ee5a.fc26     fedora 
gimp-save-for-web.x86_64               0.29.3-2.fc26                     fedora 
gimp-separate+.x86_64                  0.5.8-17.fc26                     fedora 
gimp-wavelet-decompose.noarch          0-1.fc26                          fedora 
gimp-wavelet-denoise-plugin.x86_64     0.3.1-10.fc26                     fedora 
gimpfx-foundry.noarch                  2.6.1-6.fc26                      fedora
Reply With Quote
Old 13th September 2017, 01:20 AM
steevithak Offline
Registered User
Join Date: Jun 2010
Posts: 12
Re: Does dnf support wildcards like yum did?

Thanks! That worked. And, you're correct, the problem turned out to be that there was a file in the current directory whose name started with 'gimp'. I did a cd to another directory with no files by that name and "dnf list gimp*" worked fine. But in the directory with a file starting with gimp, I had to use the single quotes. Weird, I've used RedHat and Fedora for years and never run into that before. If yum had the same behavior I guess I just never happened to use a wildcard search in a directory that had a similarly named file...
Reply With Quote
Old 13th September 2017, 01:58 PM
dodona Online
Registered User
Join Date: Sep 2016
Location: Frankfort, Germany
Posts: 50
Re: Does dnf support wildcards like yum did?

dnf {what}provides
Reply With Quote
Old 13th September 2017, 05:02 PM
steevithak Offline
Registered User
Join Date: Jun 2010
Posts: 12
Re: Does dnf support wildcards like yum did?

Originally Posted by dodona View Post
dnf {what}provides
Thanks, but not what I'm looking for. That tells me what RPM package provides a particular file which is not what I'm trying to find out. I'm trying to use wildcards with dnf to get list of all packages whose names start with a particular character string. Marko's answer solved the problem, I just needed to put single quotes around the argument.
Reply With Quote

dnf, support, wildcards, yum

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
yum install Wildcards erictang121170 Using Fedora 1 3rd June 2015 07:57 AM
ln -s accept wildcards? COKEDUDE Using Fedora 11 27th September 2011 09:02 AM
filename wildcards JILY0 Linux Chat 5 20th June 2010 02:18 PM
cp command with wildcards pshepherd Using Fedora 6 3rd January 2007 10:23 AM
Using Wildcards with Yum - Can Ya? Can I? chris_y2k_r1 Using Fedora 8 13th March 2006 03:39 AM

Current GMT-time: 17:46 (Sunday, 24-09-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat