Find: Path Must Precede Expression: 2
This page answers questions like these:
- Why am I getting this “find: path must precede expression: 2” error?
- Where is “find: path must precede expression: 2” coming from?
- What is causing the error “find: path must precede expression: 2”?
Related Links:
Find Positions of a Hexadecimal Sequence in a File
Find and/or Replace a Tilde in Excel
Find Path Must Precede Expression:
Example:
$ find -type f -size +100M -exec ls -l {} \; 2> /dev/null
find: path must precede expression: 2
usage: find [-H] [L] [-P] [path ...] [expression ...]
$
- This bizarre error often occurs when you’re using the wrong shell! – You think you’re using bash, ksh, or sh, but you’re actually using csh!
- When using csh, there is no easy way to redirect only stderr. If you want to redirect both stdout and stderr in csh you can use “>&”. In fact, “>&” works the same way in bash, and so does “&>”.
- If you want to easily redirect only stderr, use a different shell, e.g. bash, ksh, or sh.
Related Links:
Find Positions of a Hexadecimal Sequence in a File
Find and/or Replace a Tilde in Excel
Home > Linux / Unix > Find: Path Must Precede Expression: 2
Tags: path must precede expression, find path must precede expression, find path must precede expression 2, find: path must precede expression: 2, find paths must precede expression, usage: find, csh, bash, ksh, Linux, Unix
Copyright © HelpDoco.com
find-path-must-precede-expression.txt
Linux-Unix/find-path-must-precede-expression-error.htm
1