Skip to content
Advertisement

Paths must precede expression Linux find

I have the following command:

find -xtype f -iname '*NEN*' -o '*1990*'

I get the error “find: paths must precede expression: 1990” Why is this? I have quoted the wildcard, so I don’t see the error. How to fix this?

Thanks!

Advertisement

Answer

You need to repeat the -iname argument:

find -xtype f -iname '*NEN*' -o -iname '*1990*'
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement