Re: Find all .desktop files in my system – failed
gurus.knugum at gmail.com
Sat Nov 10 09:33:19 UTC 2012
2012/11/10 Mark Widdicombe <markwiddicombe at gmail.com>:
> On 10 November 2012 10:59, Johnny Rosenberg <gurus.knugum at gmail.com> wrote:
>> I'm not sure what I'm doing wrong here (I am a beginner too, since a
>> few years back…), but obviously I misunderstood the find command
>> ~$ sudo find / -iname *.desktop 2>/dev/null
>> But, in /usr/share/applications/ there are loads of .desktop files.
>> Why are they not found?
>> Then I tried this:
>> ~$ cd /usr/share/applications/
>> applications$ sudo find . -iname *.desktop 2>/dev/null
>> applications$ sudo find . -iname *.desktop
>> find: paths must precede expression: anjuta.desktop
>> Usage: find [-H] [-L] [-P] [-Olevel] [-D
>> help|tree|search|stat|rates|opt|exec] [path...] [expression]
>> I am not sure I understand the error message. Path must precede
>> expression, yes, but isn't that exactly the case?
>> Kind regards
>> Johnny Rosenberg
> Hi Johnny,
> Have you tried quoting your pattern thus:--
> sudo find . -iname "*.desktop" 2>/dev/null
That works, but I'm not sure why. Without the quotes, it at least
found something. What's the difference finding
/etc/skel/examples.desktop (found without the quotes) vs finding
/etc/xdg/autostart/pulseaudio.desktop (not found without the quotes),
But yes, it works, thank you.
More information about the ubuntu-users