-2

System: Ubuntu 11.04, regular user account:

find /usr/share -name *.wav

works okay, but if i do:

find /usr/share -name *.png

it does not produce any output

How do i change the last command to produce an output, like the first command did?

Fabby
  • 5,836
  • 2
  • 22
  • 38
  • 4
    Are you really using an OS that [does not receive any updates since 8,5 years](https://fridge.ubuntu.com/2012/10/28/ubuntu-11-04-natty-narwhal-end-of-life-reached-on-october-28-2012/)?? – pLumo Jun 12 '19 at 11:38
  • @pLumo given [this](https://unix.stackexchange.com/questions/523463/why-dev-console-for-remote-beep-echo-command#comment967857_523463), doesn't seem unlikely – muru Jun 12 '19 at 11:46

1 Answers1

2

You have an unescaped * in your find. That is handled by the shell before find even sees it, so the difference in output is probably because you're in a directory currently that doesn't have wav files in it (*.wav doesn't expand), but you do have png files.

What should work for you is find /usr/share -name \*.png or -name '*.png'.

Ulrich Schwarz
  • 15,669
  • 4
  • 47
  • 58
  • exactly..., your post solved this..., thank you very much.- – McErroneous Jun 12 '19 at 11:42
  • @McErroneous As you're new on this site, please don't forget to click the grey **☑** at the left of [the answer that is the most useful of all](/help/accepted-answer)! **;-)** – Fabby Jun 12 '19 at 11:44