Question (*nix) using find, not getting the same results as with a search through UI (nemo)

mikeymikec

Lifer
May 19, 2011
21,393
16,602
136
I had to do a manual install of makemkv (to get an older version of it), which resulted in a Mint launcher entry that lacked an icon. I wanted to find if/where the ico for makemkv was on my computer and modify the launcher entry.

I ran:
find /usr/ -name "makemkv*"

And got several results, but I get more results by doing a search in a file manager window (nemo, on Linux Mint). I suspect this is because the command I ran is asking for any files named makemkv*, but searching for makemkv*.* results in asking for files names makemkv with whatever then a full stop then whatever, which excludes files that were called for example 'makemkv'. If I wanted to get both sets of results with one find command, how would I go about doing it?

I've achieved what I want to achieve already (the launcher entry now has the proper MakeMKV icon) but I would like to learn more about stuff at the command line.
 

manly

Lifer
Jan 25, 2000
13,501
4,190
136
Unclear to me why the results differed. Can you give a concrete example of what the UI found that the CLI didn't?

*.* is old DOS syntax, which I assume was inherited from CP/M? In other words, you wouldn't use the pattern 'makemkv*.*' unless you had a very specific reason to.

'makemkv*' would match just makemkv , or obviously filenames with additional trailing characters.

Here's a trivial example to illustrate that * matches 0 or more characters.

$ find /usr/bin -name 'find*'
/usr/bin/find
/usr/bin/findmnt
 

mikeymikec

Lifer
May 19, 2011
21,393
16,602
136
Code:
mike@mikepc:~$ find /usr/ -name "makemkv*"
/usr/bin/makemkvcon
/usr/bin/makemkv
/usr/share/icons/hicolor/64x64/apps/makemkv.png
/usr/share/icons/hicolor/128x128/apps/makemkv.png
/usr/share/icons/hicolor/22x22/apps/makemkv.png
/usr/share/icons/hicolor/256x256/apps/makemkv.png
/usr/share/icons/hicolor/32x32/apps/makemkv.png
/usr/share/icons/hicolor/16x16/apps/makemkv.png
/usr/share/applications/makemkv.desktop

find.png

Ah, figured it out:

Code:
mike@mikepc:~$ find /usr/ -name "*makemkv*"
/usr/lib/libmakemkv.so.1
/usr/bin/makemkvcon
/usr/bin/makemkv
/usr/share/icons/hicolor/64x64/apps/makemkv.png
/usr/share/icons/hicolor/128x128/apps/makemkv.png
/usr/share/icons/hicolor/22x22/apps/makemkv.png
/usr/share/icons/hicolor/256x256/apps/makemkv.png
/usr/share/icons/hicolor/32x32/apps/makemkv.png
/usr/share/icons/hicolor/16x16/apps/makemkv.png
/usr/share/applications/makemkv.desktop
The only extra match from the UI then is the folder 'MakeMKV' which technically isn't a match for '*makemkv*'.