Reputation: 1844
I search for two files that has changed recently in a folder, but it seems I invoke find
incorrectly. In return I get only the results for the second file.
find /tmp -name 'twofirmscoop.so' -o -name 'twofirms.so' -exec ls -lt {} + 2>/dev/null
Upvotes: 3
Views: 69
Reputation: 1364
Try this:
find /tmp \( -name 'twofirmscoop.so' -o -name 'twofirms.so' \) -exec ls -lt {} + 2>/dev/null
Upvotes: 1
Reputation: 212584
The -exec
argument only applies to the second match. To group them, do:
find /tmp \( -name 'twofirmscoop.so' -o -name 'twofirms.so' \) -exec ls -lt {} +
Upvotes: 2