0

When using a simple find command like this:

find /volume6/Misc \( -name *.rar -o -name *.zip -o -name *.7z \)

If I execute this from the root directory (where volume6 is) the command returns all of the expected results, but if I execute the same command from within /volume6/Misc/ it suddenly only returns a 5-6 results instead of the 100+ I got when executed from the root directory.

If I am explicitly referencing the path as starting from the root with my leading /, why would the find command return fewer results when executed from directory A vs directory B? Its searching the same location either way.

Giardino
  • 101

1 Answers1

0

I overlooked the fact that when using wildcards, the * is evaluated first unless it is enclosed in quotations. Changing my command to:

find /volume6/Misc \( -name "*.rar" -o -name "*.zip" -o -name "*.7z" \)

returns the correct number of results regardless of starting location.

Giardino
  • 101