Re: Find all .desktop files in my system – failed

Mark Widdicombe markwiddicombe at gmail.com
Sat Nov 10 09:24:44 UTC 2012


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
> completely:
> ~$ sudo find / -iname *.desktop 2>/dev/null
> /home/guraknugen/examples.desktop
> /home/video/examples.desktop
> /etc/skel/examples.desktop
> ~$
>
> 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$
>
> Then:
> 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]
> applications$
>
> I am not sure I understand the error message. Path must precede
> expression, yes, but isn't that exactly the case?
>
> Confused…
>
>
>
> Kind regards
>
> Johnny Rosenberg
Hi Johnny,

Have you tried quoting your pattern thus:--

sudo find . -iname "*.desktop" 2>/dev/null




More information about the ubuntu-users mailing list