summaryrefslogtreecommitdiffhomepage
path: root/findutils/find.c
diff options
context:
space:
mode:
Diffstat (limited to 'findutils/find.c')
-rw-r--r--findutils/find.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/findutils/find.c b/findutils/find.c
index 6407c6c5a..06ad1b39c 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -1467,6 +1467,12 @@ int find_main(int argc UNUSED_PARAM, char **argv)
break;
if (!saved[1])
break; /* it is "-" */
+ if (saved[1] == '-' && !saved[2]) {
+ /* it is "--" */
+ /* Try: find -- /dev/null */
+ saved = *++past_HLP;
+ break;
+ }
if ((saved+1)[strspn(saved+1, "HLP")] != '\0')
break;
}