FedoraForum.org - Fedora Support Forums and Community
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2010

    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

  2. #2
    Join Date
    Jun 2004
    Laurel, MD USA

    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

  3. #3
    Join Date
    Jun 2010

    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...

  4. #4
    Join Date
    Sep 2016
    Frankfort, Germany

    Re: Does dnf support wildcards like yum did?

    dnf {what}provides

  5. #5
    Join Date
    Jun 2010

    Re: Does dnf support wildcards like yum did?

    Quote Originally Posted by dodona
    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.

Similar Threads

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts