Difference between revisions 507803 and 507804 on knwiki{{otheruses}} {{lowercase|title=find}} The <code>'''find'''</code> program is a [[directory (file systems)|directory]] [[search utility]], mostly found on [[Unix-like]] platforms. It searches through one or more directory [[tree (computing)|trees]] of a [[filesystem]], locating [[Computer file|file]]s based on some user-specified criteria. By default, <code>find</code> returns all files below the current [[working directory]]. Further, <code>find(contracted; show full) ===Ignore errors=== If you're doing this as a user other than root, you might want to ignore permission denied (and any other) errors. Since errors are printed to [[stderr]], they can be suppressed by redirecting the output to /dev/null. The following example shows how to do this in the bash shell: find / -name "myfile" -type f -print 2>/dev/null ===Find any one of differently named files=== find . \( -name "*jsp" -or -name "*java" \) -type f -ls The <code>-ls</code> option prints extended information, and the example finds any file whose name ends with either 'jsp' or 'java'. Note that the parentheses are required. Also note that the operator "or" can be abbreviated as "o". The "and" operator is assumed where no operator is given. In many shells the parentheses must be escaped with a backslash, "\(" and "\)", to prevent them from being interpreted as s(contracted; show full) [[de:Find]] [[es:Find]] [[hu:Find]] [[ja:Find]] [[pl:Find]] [[pt:Find]] [[ru:Find]] All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://kn.wikipedia.org/w/index.php?diff=prev&oldid=507804.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|