You are not logged in.

#1 2015-01-13 17:45:45

Veske
Member
Registered: 2015-01-13
Posts: 12

[SOLVED] Unable to use program find with star sign in the search name

So I am trying to do a pretty basic task, searching for files in Arch.

What I am trying to use currently:  find / -name idea.*
And when I execute it, I get this error: zsh: no matches found: idea.*

The same thing done in Debian and Ubuntu seems to work with no problems. What might I missing here? Is it because of the shell I use?

Last edited by Veske (2015-01-13 17:59:09)

Offline

#2 2015-01-13 17:49:19

Spider.007
Member
Registered: 2004-06-20
Posts: 1,176

Re: [SOLVED] Unable to use program find with star sign in the search name

You shell expands the glob; therefore you need to escape the '*' to pass it to the command. You can test this yourself; try this, it'll throw the same error:

echo idea.*

Last edited by Spider.007 (2015-01-13 17:50:09)

Offline

#3 2015-01-13 17:52:08

▫ ▪ ▫
Member
Registered: 2015-01-09
Posts: 8

Re: [SOLVED] Unable to use program find with star sign in the search name

alias find="noglob find"

Offline

#4 2015-01-13 17:55:41

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [SOLVED] Unable to use program find with star sign in the search name

In addition to escaping, you can just quote the entire search string. You should always escape or quote when characters which have special meaning to the shell are involved, regardless of the command.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#5 2015-01-13 17:55:52

Veske
Member
Registered: 2015-01-13
Posts: 12

Re: [SOLVED] Unable to use program find with star sign in the search name

Thank you! Got it working now like that.

Offline

Board footer

Powered by FluxBB