Difference between revisions 507848 and 507849 on knwiki{{otheruses}} {{lowercase|title=find}} The <code>'''find'''</code> program is a [[directory (file systems)|directory]] [[Search_engine_(computing)|search utility]] 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, <c(contracted; show full) find / -name "myfile" -type f -print 2>/dev/null If you are a [[C shell|csh]] or [[tcsh]] user, you cannot redirect [[stderr]] without redirecting [[stdout]] as well. You can use sh to run the find command to get around this: sh -c find / -name "myfile" -type f -print 2>/dev/null ===Find any one of differently named files=== find . \( -name "*jsp" -o r -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 f(contracted; show full)[[fr:Find]] [[it:Find (Unix)]] [[hu:Find]] [[ja:Find]] [[pl:Find]] [[pt:Find]] [[ru:Find]] [[fi:Find (Unix)]] 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=507849.
![]() ![]() 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.
|