Find all .desktop files in my system – failed
tony.arnold at manchester.ac.uk
Sat Nov 10 11:22:25 UTC 2012
On 10/11/12 10:01, Johnny Rosenberg wrote:
> 2012/11/10 Tony Arnold <tony.arnold at manchester.ac.uk>:
>> sudo find / -iname '*.desktop' 2>/dev/null
> I am not sure what you mean (maybe because English is not my main language).
> ”Escape the * in the name part”
> If I understand that correctly, this should work:
> sudo find / -iname \*.desktop 2>/dev/null
> And it does. So far so good.
Yes, that will work too.
> ”Or put the name part in quotes”
> Shouldn't that mean something like
> sudo find / -iname *".desktop" 2>/dev/null
That's not quite what I meant but I can see you might think that.
> rather than
> sudo find / -iname "*.desktop" 2>/dev/null
> Because * is not the ”name part”, is it?
By 'name part' I was thinking of the parameter you are giving to the
'-iname' option which in this case is *.desktop.
The purpose of all this is to stop the shell from expanding characters
like * in a command. Surrounding by quotes or escaping the * character
> But obviously not, since that does not work…
> Anyway, I know what to do now, which is the main thing in this case.
> Thanks for your help.
You are welcome.
Tony Arnold, Tel: +44 (0) 161 275 6093
Head of IT Security, Fax: +44 (0) 705 344 3082
University of Manchester, Mob: +44 (0) 773 330 0039
Manchester M13 9PL. Email: tony.arnold at manchester.ac.uk
More information about the ubuntu-users