0

I want to show all files with the name "index.php" in a specific area of my machine. For this I wrote this code-line:

-find /iu/cuve/u3 -name "index.php"

I want it to only show the lines witch include "index.php" in it, but this command shows a bunch of other lines witch does not include "index.php". Many of them ends with "Permission denied", maybe thats why I can't see the "index.php" part of the line.

I tried to add a -exec grep command to it, but didn't get the results I'm looking for.

marked as duplicate by steeldriver, Kusalananda linux Feb 1 at 14:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Thank you @steeldriver. It pointed me in the right direction. Fixed it with this line: "find /iu/cube/u3 index.php 2>&- | grep index.php" – Magnarok Feb 1 at 14:13
0

Got my wanted result with:

find /iu/cube/u3 index.php 2>&- | grep index.php

Not the answer you're looking for? Browse other questions tagged or ask your own question.